summaryrefslogtreecommitdiff
path: root/FL/Fl_Text_Display.H
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2024-10-19 15:53:18 +0200
committerMatthias Melcher <github@matthiasm.com>2024-10-19 15:53:29 +0200
commit737137cf7827fac685ab3c5f3d032de580fe764d (patch)
treec33eccbd6cc22469a8007210a2f63dd1679ba1e5 /FL/Fl_Text_Display.H
parent6ea450407b3d9e5d6f2731ee6f89b1000e1f3c22 (diff)
Fixes Fl_Text_Display line number calculation. (#1088)
Diffstat (limited to 'FL/Fl_Text_Display.H')
-rw-r--r--FL/Fl_Text_Display.H5
1 files changed, 4 insertions, 1 deletions
diff --git a/FL/Fl_Text_Display.H b/FL/Fl_Text_Display.H
index b5625d04d..533839a04 100644
--- a/FL/Fl_Text_Display.H
+++ b/FL/Fl_Text_Display.H
@@ -572,7 +572,10 @@ protected:
int mCursorPreferredXPos; /* Pixel position for vert. cursor movement */
int mNVisibleLines; /* # of visible (displayed) lines. This is
also the size of the mLineStarts[] array. */
- int mNBufferLines; /* # of newlines in the buffer */
+ int mNBufferLines; /* # of newlines in the buffer, or number of
+ wraps if line wrapping is enabled. Note that
+ partial lines at the end of the buffer are
+ not counted, so you may want to add 1. */
Fl_Text_Buffer* mBuffer; /* Contains text to be displayed */
Fl_Text_Buffer* mStyleBuffer; /* Optional parallel buffer containing
color and font information */