vis

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

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

commit 0fd391c4d3966ab1f559fe632ccc8f6ca244f31a
parent 7174f9be43b35453ba2fdae76d30c17775319110
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Mon,  4 Apr 2016 09:36:24 +0200

sam: fixup 248c7ff914bb4f6fd64a08f525a57396e68d2fc6

For commands like :q the view might already have been freed

Diffstat:
Msam.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sam.c b/sam.c @@ -929,7 +929,7 @@ static bool cmd_select(Vis *vis, Win *win, Command *cmd, const char *argv[], Cur ret &= sam_execute(vis, win, cmd->cmd, c, &sel); } - if (primary != view_cursors_primary_get(view)) + if (view == vis->win->view && primary != view_cursors_primary_get(view)) view_cursors_primary_set(view_cursors(view)); return ret; }