vis

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

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

commit 3b4438dcb89452a74eb70498a9f61b27b7d51045
parent b3574923732464feae77530967513f0b4fa6c6c6
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Wed,  1 Mar 2017 18:01:34 +0100

lua: return nil for invalid text objects

Diffstat:
Mlua/plugins/textobject-lexer.lua | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lua/plugins/textobject-lexer.lua b/lua/plugins/textobject-lexer.lua @@ -5,7 +5,7 @@ local MAX_CONTEXT = 32768 vis:textobject_new("ii", function(win, pos) if win.syntax == nil or not vis.lexers then - return pos, pos + return nil end local before, after = pos - MAX_CONTEXT, pos + MAX_CONTEXT @@ -30,5 +30,5 @@ vis:textobject_new("ii", function(win, pos) cur = token_next end - return pos, pos + return nil end, "Current lexer token")