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.
This commit is contained in:
Andrew Fuller 2024-09-27 19:11:41 -07:00 committed by Albrecht Schlosser
parent 84eeac5892
commit f348e2bdb9

View File

@ -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 {