diff --git a/src/gui/value/text.cpp b/src/gui/value/text.cpp index 5bd24758..6ff30d07 100644 --- a/src/gui/value/text.cpp +++ b/src/gui/value/text.cpp @@ -665,12 +665,13 @@ void TextValueEditor::draw(RotatedDC& dc) { } } -void TextValueEditor::redrawSelection(size_t old_selection_start_i, size_t old_selection_end_i, bool old_drop_down_shown) { +void TextValueEditor::redrawSelection(size_t old_selection_start_i, size_t old_selection_end_i, bool old_drop_down_shown) { // Hide caret if (isCurrent()) { wxCaret* caret = editor().GetCaret(); if (caret->IsVisible()) caret->Hide(); - } + } +#ifdef __WXMSW__ // Destroy the clientDC before reshowing the caret, prevent flicker on MSW { // Move selection @@ -701,7 +702,14 @@ void TextValueEditor::redrawSelection(size_t old_selection_start_i, size_t old_s // redraw drop down indicators drawWordListIndicators(dc, true); } - } + } +#else + scroll_with_cursor = true; + if (ensureCaretVisible()) { + updateScrollbar(); + } + redraw(); +#endif if (isCurrent()) { showCaret(); }