FLTK logo

STR #1069

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]
 

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:

Receive EMails Don't Receive EMails

Trouble Report Files:


Name/Time/Date Filename/Size  
 
#1 mike
13:22 Nov 09, 2005
str1069.patch
2k
 
     

Trouble Report Comments:


Name/Time/Date Text  
 
#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 ]

 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.