Skip to content

Commit

Permalink
Use the result from CalculatePosition to see if bar spans screen.
Browse files Browse the repository at this point in the history
  • Loading branch information
dstein64 committed Dec 14, 2020
1 parent ef1a434 commit 6696fb8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions autoload/scrollview.vim
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ function! s:ShowScrollbar(winnr) abort
if l:winheight ==# 0 || l:winwidth ==# 0
return
endif
let l:bar_position = s:CalculatePosition(l:winnr)
" Don't show the position bar when it would span the entire screen.
if l:winheight >=# nvim_buf_line_count(l:bufnr)
if l:winheight ==# l:bar_position.height
return
endif
let l:bar_position = s:CalculatePosition(l:winnr)
if s:bar_bufnr ==# -1
let s:bar_bufnr = nvim_create_buf(0, 1)
call setbufvar(s:bar_bufnr, '&modifiable', 0)
Expand Down

0 comments on commit 6696fb8

Please sign in to comment.