diff options
| author | Matthias Melcher <github@matthiasm.com> | 2024-10-19 15:53:18 +0200 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2024-10-19 15:53:29 +0200 |
| commit | 737137cf7827fac685ab3c5f3d032de580fe764d (patch) | |
| tree | c33eccbd6cc22469a8007210a2f63dd1679ba1e5 /src | |
| parent | 6ea450407b3d9e5d6f2731ee6f89b1000e1f3c22 (diff) | |
Fixes Fl_Text_Display line number calculation. (#1088)
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Text_Display.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index ca0f7e6a2..c1f575b1b 100644 --- a/src/Fl_Text_Display.cxx +++ b/src/Fl_Text_Display.cxx @@ -702,7 +702,7 @@ void Fl_Text_Display::recalc_display() { scroll_(mTopLineNumHint, mHorizOffsetHint); // everything will fit in the viewport - if (mNBufferLines < mNVisibleLines || mBuffer == NULL || mBuffer->length() == 0) { + if ((mNBufferLines+1 < mNVisibleLines) || (mBuffer == NULL) || (mBuffer->length() == 0)) { scroll_(1, mHorizOffset); /* if empty lines become visible, there may be an opportunity to display more text by scrolling down */ |
