Selection highlight debug for linux

this is not optimized but it'll do for now
This commit is contained in:
GenevensiS
2026-06-05 05:08:57 +02:00
committed by GitHub
parent 512a237f39
commit d9b58bb5eb
+11 -3
View File
@@ -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 // Hide caret
if (isCurrent()) { if (isCurrent()) {
wxCaret* caret = editor().GetCaret(); wxCaret* caret = editor().GetCaret();
if (caret->IsVisible()) caret->Hide(); if (caret->IsVisible()) caret->Hide();
} }
#ifdef __WXMSW__
// Destroy the clientDC before reshowing the caret, prevent flicker on MSW // Destroy the clientDC before reshowing the caret, prevent flicker on MSW
{ {
// Move selection // Move selection
@@ -701,7 +702,14 @@ void TextValueEditor::redrawSelection(size_t old_selection_start_i, size_t old_s
// redraw drop down indicators // redraw drop down indicators
drawWordListIndicators(dc, true); drawWordListIndicators(dc, true);
} }
} }
#else
scroll_with_cursor = true;
if (ensureCaretVisible()) {
updateScrollbar();
}
redraw();
#endif
if (isCurrent()) { if (isCurrent()) {
showCaret(); showCaret();
} }