summaryrefslogtreecommitdiff
path: root/src/highlighter.hh
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2025-06-25 10:59:10 +1000
committerMaxime Coste <mawww@kakoune.org>2025-06-25 11:15:23 +1000
commit635452f2b47cdddb5118f07fe831224c93eb9803 (patch)
treec6f4fcc7c57fc7af800d9d7d3d9b3b8b81b4442f /src/highlighter.hh
parentfc013317fff00f4db66c3059ad87343656a4d9d9 (diff)
Rework highlighting management of cursor position
Move the whole responsibility of making the cursor visible to the window, removing cursor_pos from the display setup and resolving the cursor location by finding it in the display buffer afterwards. This simplifies hightlighters' do_compute_display_setup as they do not need to compute the cursor location. Highlighting may run on more lines than necessary after this change but this should be a minor performance hit.
Diffstat (limited to 'src/highlighter.hh')
-rw-r--r--src/highlighter.hh3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/highlighter.hh b/src/highlighter.hh
index 73520c53..8a60c0c1 100644
--- a/src/highlighter.hh
+++ b/src/highlighter.hh
@@ -43,11 +43,8 @@ struct DisplaySetup
LineCount line_count;
ColumnCount first_column;
ColumnCount widget_columns;
- // Position of the cursor in the window
- DisplayCoord cursor_pos;
// Offset of line and columns that must remain visible around cursor
DisplayCoord scroll_offset;
- bool ensure_cursor_visible;
};
using HighlighterIdList = ConstArrayView<StringView>;