mirror of
https://github.com/neovim/neovim.git
synced 2025-10-16 23:06:14 +00:00
vim-patch:9.1.1601: Patch v8.1.0425 was wrong
Problem: Patch v8.1.0425 was wrong Solution: Revert that patch (Hirohito Higashi) This is because the root cause was fixed in 8.1.0786 and a regression occurred elsewhere. related: vim/vim#3455 related: vim/vim#3830 fixes: vim/vim#11558 closes: vim/vim#178996abe5e4904
Co-authored-by: Hirohito Higashi <h.east.727@gmail.com> (cherry picked from commit7230296bdb
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
a65c4be2de
commit
53a0d99702
@@ -609,4 +609,31 @@ func Test_closed_buffer_still_in_window()
|
||||
%bw!
|
||||
endfunc
|
||||
|
||||
" Cursor position should be restored when switching to a buffer previously
|
||||
" viewed in a window, regardless of whether it's visible in another one.
|
||||
func Test_switch_to_previously_viewed_buffer()
|
||||
set nostartofline
|
||||
new Xviewbuf
|
||||
call setline(1, range(1, 200))
|
||||
let oldwin = win_getid()
|
||||
vsplit
|
||||
|
||||
call cursor(100, 3)
|
||||
edit Xotherbuf
|
||||
buffer Xviewbuf
|
||||
call assert_equal([0, 100, 3, 0], getpos('.'))
|
||||
|
||||
exe win_id2win(oldwin) .. 'close'
|
||||
setlocal bufhidden=hide
|
||||
|
||||
call cursor(200, 3)
|
||||
edit Xotherbuf
|
||||
buffer Xviewbuf
|
||||
call assert_equal([0, 200, 3, 0], getpos('.'))
|
||||
|
||||
bwipe! Xotherbuf
|
||||
bwipe! Xviewbuf
|
||||
set startofline&
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
Reference in New Issue
Block a user