| [ Return to Bugs & Features | Roadmap 1.1 | SVN ⇄ GIT ]
STR #1069
Application: | FLTK Library |
Status: | 1 - Closed w/Resolution |
Priority: | 4 - High, e.g. key functionality not working |
Scope: | 3 - Applies to all machines and operating systems |
Subsystem: | Core Library |
Summary: | Fl_Text_Display::wrap_mode() crashes, when no text buffer assigned |
Version: | 1.1.6 |
Created By: | AlbrechtS |
Assigned To: | mike |
Fix Version: | 1.1-current (SVN: v4647) |
Update Notification: | |
Trouble Report Files:
Trouble Report Comments:
|
#1 | AlbrechtS 07:49 Nov 09, 2005 |
| The summary says it all ;-)
void Fl_Text_Display::wrap_mode(int wrap, int wrapMargin) { mWrapMargin = wrapMargin; mContinuousWrap = wrap;
/* wrapping can change change the total number of lines, re-count */ mNBufferLines = count_lines(0, buffer()->length(), true); ---------------------------------^^^^^^^^
I tried to add:
if (!buffer()) return;
before the marked line, but this seemed to prevent the wrap mode from being set correctly, though I'm not sure.
BTW: Fl_Text_Display::wrap_mode() is missing in the documentation
Albrecht | |
|
#2 | AlbrechtS 09:39 Nov 09, 2005 |
| Addition: To be clear:
(1) Setting wrap_mode() after assigning a text buffer works as expected.
(2) Setting wrap_mode() before assigning a buffer crashes (without a patch).
(3) After patching Fl_Text_Display::wrap_mode() as described above, setting wrap_mode() before text buffer assignment doesn't crash, but doesn't set wrapping as it should (IMHO).
Albrecht | |
|
#3 | mike 13:22 Nov 09, 2005 |
| Try the attached patch, which should fix things... | |
|
#4 | AlbrechtS 04:04 Nov 10, 2005 |
| Okay, this worked.
Thanks for the fast response.
Albrecht | |
|
#5 | mike 06:49 Nov 10, 2005 |
| Fixed in Subversion repository. | |
[ Return to Bugs & Features ]
|
| |