aboutsummaryrefslogtreecommitdiff
path: root/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'window.c')
-rw-r--r--window.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/window.c b/window.c
index ba47d8f..8a2ad12 100644
--- a/window.c
+++ b/window.c
@@ -406,9 +406,6 @@ void window_draw(Win *win) {
}
}
- if (sel.start <= pos && pos < sel.end)
- attrs |= A_REVERSE;
-
size_t len = mbrtowc(&c.wchar, cur, rem, NULL);
if (len == (size_t)-1 && errno == EILSEQ) {
/* ok, we encountered an invalid multibyte sequence,
@@ -442,7 +439,11 @@ void window_draw(Win *win) {
c = (Char){ .c = "\n", .wchar = L'\n', .len = len };
}
- wattrset(win->win, attrs);
+ if (sel.start <= pos && pos < sel.end)
+ wattrset(win->win, attrs | A_REVERSE);
+ else
+ wattrset(win->win, attrs);
+
if (!window_addch(win, &c))
break;