mirror of https://github.com/helix-editor/helix
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.pull/13063/head
parent
8da226f0b4
commit
2d3b75a8c5
|
@ -176,6 +176,8 @@ impl EditorView {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Self::render_rulers(editor, doc, view, inner, surface, theme);
|
||||||
|
|
||||||
let primary_cursor = doc
|
let primary_cursor = doc
|
||||||
.selection(view.id)
|
.selection(view.id)
|
||||||
.primary()
|
.primary()
|
||||||
|
@ -210,7 +212,6 @@ impl EditorView {
|
||||||
theme,
|
theme,
|
||||||
decorations,
|
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 we're not at the edge of the screen, draw a right border
|
||||||
if viewport.right() != view.area.right() {
|
if viewport.right() != view.area.right() {
|
||||||
|
|
Loading…
Reference in New Issue