mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-08 11:23:48 -05:00
fix screen jumping bug with &scrolloff
This commit is contained in:
@@ -784,6 +784,9 @@ fridge for later ;)
|
|||||||
==============================================================================
|
==============================================================================
|
||||||
7. Changelog *NERDTreeChangelog*
|
7. Changelog *NERDTreeChangelog*
|
||||||
|
|
||||||
|
2.9.1
|
||||||
|
- fix screen jumping bug with when &scrolloff != 0
|
||||||
|
|
||||||
2.9.0
|
2.9.0
|
||||||
|
|
||||||
- path handling improvements, thanks to Zhang Shuhan for heaps of
|
- path handling improvements, thanks to Zhang Shuhan for heaps of
|
||||||
|
|||||||
@@ -2107,9 +2107,12 @@ function! s:RenderView()
|
|||||||
:silent 1,1delete _
|
:silent 1,1delete _
|
||||||
|
|
||||||
"restore the view
|
"restore the view
|
||||||
|
let old_scrolloff=&scrolloff
|
||||||
|
let &scrolloff=0
|
||||||
call cursor(topLine, 1)
|
call cursor(topLine, 1)
|
||||||
normal! zt
|
normal! zt
|
||||||
call cursor(curLine, curCol)
|
call cursor(curLine, curCol)
|
||||||
|
let &scrolloff = old_scrolloff
|
||||||
|
|
||||||
setlocal nomodifiable
|
setlocal nomodifiable
|
||||||
endfunction
|
endfunction
|
||||||
|
|||||||
Reference in New Issue
Block a user