Skip to content

Commit

Permalink
move list_height to getter function
Browse files Browse the repository at this point in the history
  • Loading branch information
bhcleek committed Mar 27, 2018
1 parent 3f143fe commit 287c706
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions autoload/go/config.vim
Original file line number Diff line number Diff line change
Expand Up @@ -264,4 +264,8 @@ function! go#config#SetMetalinterAutosave(value) abort
let g:go_metalinter_autosave = a:value
endfunction

function! go#config#ListHeight() abort
return get(g:, "go_list_height", 0)
endfunction

" vim: sw=2 ts=2 et
2 changes: 1 addition & 1 deletion autoload/go/list.vim
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function! go#list#Window(listtype, ...) abort
return
endif

let height = get(g:, "go_list_height", 0)
let height = go#config#ListHeight()
if height == 0
" prevent creating a large location height for a large set of numbers
if a:1 > 10
Expand Down

0 comments on commit 287c706

Please sign in to comment.