vis

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

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

commit b52a3547b758b7eeff447f3e3db0de9ec636573f
parent 773c8a3a790714a80f59af2ab2fa691d93a55d94
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Tue,  1 Nov 2016 15:36:50 +0100

vis: abort syntax highlighting if viewport is invalid

In theory this should not happen in the first place, but in practice it
might fix the symptoms reported in issue #367.

Diffstat:
Mvis.lua | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/vis.lua b/vis.lua @@ -345,6 +345,9 @@ vis.events.win_highlight = function(win, horizon_max) -- TODO: improve heuristic for initial style local viewport = win.viewport + if not viewport then + return + end local horizon = viewport.start < horizon_max and viewport.start or horizon_max local view_start = viewport.start local lex_start = viewport.start - horizon