Skip to content

Commit 4ed8df7

Browse files
authored
Merge pull request #3652 from shrekwang/master
guarding s:sign_place function to avoid exception.
2 parents 3116272 + 1bc8bca commit 4ed8df7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

autoload/go/debug.vim

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1567,6 +1567,11 @@ function! s:sign_unplace(id, file) abort
15671567
endfunction
15681568

15691569
function! s:sign_place(id, expr, lnum) abort
1570+
" Check if lnum is less than 1 or expr is empty or null
1571+
if a:lnum < 1 || empty(a:expr)
1572+
return
1573+
endif
1574+
15701575
if !exists('*sign_place')
15711576
exe 'sign place ' . a:id . ' line=' . a:lnum . ' name=godebugbreakpoint file=' . a:expr
15721577
return

0 commit comments

Comments
 (0)