From ffe18f722763ead1c1b175a2d773ca2e2c09eea2 Mon Sep 17 00:00:00 2001 From: tar80 Date: Tue, 18 Apr 2023 22:57:36 +0900 Subject: [PATCH] Fix error on zero-width line --- autoload/eft.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/eft.vim b/autoload/eft.vim index 620de6b..9ad514b 100644 --- a/autoload/eft.vim +++ b/autoload/eft.vim @@ -66,7 +66,7 @@ function! s:goto(repeat, dir, till) abort let l:line = getline(l:curpos[1]) let l:col = l:curpos[2] let l:tilloff = a:till ? 1 : 0 - let l:indices = a:dir ==# s:Dir.Next ? range(l:col + l:tilloff, strlen(l:line)) : range(l:col - (2 + l:tilloff), 0, -1) + let l:indices = a:dir ==# s:Dir.Next ? range(l:col + l:tilloff, strlen(l:line) + l:tilloff) : range(l:col - (2 + l:tilloff), 0, -1) let l:char = get(s:state, 'char', v:null) if !a:repeat