Unnamed repository; edit this file 'description' to name the repository.
fix: render rulers before the cursor
Render rulers before the cursor to ensure that the cursor, when over
a ruler, is not hidden from view. Without this, you typically end up
with 1) foreground text that is the same as the background if the
ruler doesn't already have a foreground and 2) no visible cursor,
because the ruler's background color took precedence. By moving the
rulers before the cursor, this ensures that the theme is still rendered
more or less the way one would visually expect things to turn out.
| -rw-r--r-- | helix-term/src/ui/editor.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs index d8500ed4..6be56574 100644 --- a/helix-term/src/ui/editor.rs +++ b/helix-term/src/ui/editor.rs @@ -176,6 +176,8 @@ impl EditorView { ); } + Self::render_rulers(editor, doc, view, inner, surface, theme); + let primary_cursor = doc .selection(view.id) .primary() @@ -210,7 +212,6 @@ impl EditorView { theme, decorations, ); - Self::render_rulers(editor, doc, view, inner, surface, theme); // if we're not at the edge of the screen, draw a right border if viewport.right() != view.area.right() { |