Skip to content

Commit

Permalink
error window height depends on errors length
Browse files Browse the repository at this point in the history
  • Loading branch information
juanpabloaj authored Apr 28, 2024
1 parent feef9b3 commit 0076030
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion autoload/go/job.vim
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,13 @@ function! go#job#Options(args)
" only open the error window if user was still in the window from which
" the job was started.
if self.winid == l:winid
call go#list#Window(l:listtype, len(errors))
" height equal to sum of every error length divided by window width
let l:height = 0
for error in errors
let l:height += len(error.text) / winwidth(l:winid) + 1
endfor

call go#list#Window(l:listtype, l:height)
if self.bang
call win_gotoid(l:winid)
else
Expand Down

0 comments on commit 0076030

Please sign in to comment.