Skip to content

Commit c66e24c

Browse files
committed
Prevent jump to bottom when plumbing big number
1 parent 82f91d7 commit c66e24c

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

plugin/acme.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,9 @@ endfunc
484484
function s:Goto(pos)
485485
if a:pos =~ '^\v\d+([:,]\d+)?$'
486486
let pos = split(a:pos, '[:,]')
487+
if pos[0] > line('$')
488+
return
489+
endif
487490
exe 'normal!' pos[0].'G'
488491
if len(pos) > 1
489492
let col = strdisplaywidth(getline('.')[:pos[1]-1])

0 commit comments

Comments
 (0)