Skip to content

Commit d5355bf

Browse files
committed
Fix the downward-action issue in vi mode
1 parent f6b1940 commit d5355bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lTerm_vi.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ module Query = struct
242242
let cursor= Zed_edit.cursor ctx in
243243
let count= Zed_lines.count lines in
244244
if index = Zed_lines.count lines then
245-
Zed_rope.length text - 1
245+
max 0 (Zed_rope.length text - 1)
246246
else begin
247247
let stop =
248248
if index + delta >= count then

0 commit comments

Comments
 (0)