diff options
| author | Andrew Fuller <qartis@gmail.com> | 2024-09-27 19:11:41 -0700 |
|---|---|---|
| committer | Albrecht Schlosser <fltk@aljus.de> | 2024-09-28 11:05:05 +0200 |
| commit | f348e2bdb9293237513ef0853a11c63aecbe9f04 (patch) | |
| tree | 5837abec153473db28a5654526b8fd6debd6325f | |
| parent | 84eeac5892c47c657deb961ef3aa88076c8ad651 (diff) | |
Fix bug in Fl_Text_Display when tab is followed by multibyte char
When the user clicks the right half of a tab, we add 1 (the byte len of the tab) to obtain the starting index of the following character.
| -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 f20a35d0b..47fa17560 100644 --- a/src/Fl_Text_Display.cxx +++ b/src/Fl_Text_Display.cxx @@ -2139,7 +2139,7 @@ int Fl_Text_Display::handle_vline( // find x pos inside block free(lineStr); if (cursor_pos && (startX+w/2<rightClip)) // STR #2788 - return lineStartPos + startIndex + len; // STR #2788 + return lineStartPos + startIndex + 1; // STR #2788 return lineStartPos + startIndex; } } else { |
