Skip to content

Commit

Permalink
Reduce the idle event interval to min of 100ms
Browse files Browse the repository at this point in the history
Highlight word: check that we have marker before clearing the markers

Signed-off-by: Eran Ifrah <[email protected]>
  • Loading branch information
eranif committed Jan 2, 2025
1 parent 497c771 commit 3dcc350
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions LiteEditor/cl_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4375,7 +4375,7 @@ void clEditor::HighlightWord(bool highlight)
if (highlight) {
DoHighlightWord();

} else {
} else if (m_highlightedWordInfo.IsHasMarkers()) {
SetIndicatorCurrent(INDICATOR_WORD_HIGHLIGHT);
IndicatorClearRange(0, GetLength());
m_highlightedWordInfo.Clear();
Expand Down Expand Up @@ -6450,7 +6450,7 @@ void clEditor::OnIdle(wxIdleEvent& event)
event.Skip();

// The interval between idle events can not be under 250ms
static clIdleEventThrottler event_throttler{ 250 };
static clIdleEventThrottler event_throttler{ 100 };
if (!event_throttler.CanHandle()) {
return;
}
Expand Down

0 comments on commit 3dcc350

Please sign in to comment.