vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit ae5dd35879135d08784d63dac206b0ec202bf436
parent d67cc4e1a5ad77ac01a5af0bab19c414d2e148f0
Author: Jul <jul@9o.is>
Date:   Mon, 13 Oct 2025 01:55:46 +0800

bug fix: hide vis cursor on prev/next win

Diffstat:
Mvis.c | 10++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/vis.c b/vis.c @@ -461,16 +461,18 @@ void vis_window_next(Vis *vis) { if (!sel) return; vis_window_focus(sel->next ? sel->next : vis->windows); + vis_window_invalidate(sel); } void vis_window_prev(Vis *vis) { Win *sel = vis->win; if (!sel) return; - sel = sel->prev; - if (!sel) - for (sel = vis->windows; sel->next; sel = sel->next); - vis_window_focus(sel); + Win *prev = sel->prev; + if (!prev) + for (prev = vis->windows; prev->next; prev = prev->next); + vis_window_focus(prev); + vis_window_invalidate(sel); } void vis_draw(Vis *vis) {