summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2022-12-27 23:40:49 +0000
committerw0rp <devw0rp@gmail.com>2022-12-27 23:40:49 +0000
commit457e0a50f1e20694620207f6d9b522a3371ff04c (patch)
treefd79c3d67a935fd0655f859af4cb55f97e2e31a3
parenta18472cc58b85ba4e037fe3ad4c3f525aef74a85 (diff)
downloadale-457e0a50f1e20694620207f6d9b522a3371ff04c.zip
Fix #4331 - Shift line 0 errors to line 1 for virtual-text
-rw-r--r--autoload/ale/virtualtext.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/autoload/ale/virtualtext.vim b/autoload/ale/virtualtext.vim
index 59c69b78..a96a1f1d 100644
--- a/autoload/ale/virtualtext.vim
+++ b/autoload/ale/virtualtext.vim
@@ -124,7 +124,7 @@ function! ale#virtualtext#ShowMessage(buffer, item) abort
return
endif
- let l:line = a:item.lnum
+ let l:line = max([1, a:item.lnum])
let l:hl_group = ale#virtualtext#GetGroup(a:item)
" Get a language-appropriate comment character, or default to '#'.