vis

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

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

commit 9c7b11fa1b6e337bfe27e50b36f342b157471328
parent ac632a6304c5f2e0872c47f39ea951e1afc1c18d
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Thu, 16 Mar 2017 18:59:04 +0100

vis: remove special case when invalidating windows

There is no need to treat the currently focused window specially.

Diffstat:
Mvis.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/vis.c b/vis.c @@ -270,14 +270,13 @@ void vis_window_status(Win *win, const char *status) { static void windows_invalidate(Vis *vis, size_t start, size_t end) { for (Win *win = vis->windows; win; win = win->next) { - if (vis->win != win && vis->win->file == win->file) { + if (vis->win->file == win->file) { Filerange view = view_viewport_get(win->view); if ((view.start <= start && start <= view.end) || (view.start <= end && end <= view.end)) view_draw(win->view); } } - view_draw(vis->win->view); } void window_selection_save(Win *win) {