mirror of
https://github.com/neovim/neovim.git
synced 2025-09-12 06:18:16 +00:00
vim-patch:8.2.1411: when splitting a window localdir is copied but prevdir is not
Problem: when splitting a window localdir is copied but prevdir is not.
Solution: Also copy prevdir. (closes vim/vim#6667)
a9a47d157a
This commit is contained in:
@@ -192,6 +192,15 @@ func Test_prev_dir()
|
|||||||
call delete('Xdir', 'rf')
|
call delete('Xdir', 'rf')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_lcd_split()
|
||||||
|
let curdir = getcwd()
|
||||||
|
lcd ..
|
||||||
|
split
|
||||||
|
lcd -
|
||||||
|
call assert_equal(curdir, getcwd())
|
||||||
|
quit!
|
||||||
|
endfunc
|
||||||
|
|
||||||
func Test_cd_from_non_existing_dir()
|
func Test_cd_from_non_existing_dir()
|
||||||
CheckNotMSWindows
|
CheckNotMSWindows
|
||||||
|
|
||||||
|
@@ -1463,6 +1463,8 @@ static void win_init(win_T *newp, win_T *oldp, int flags)
|
|||||||
}
|
}
|
||||||
newp->w_localdir = (oldp->w_localdir == NULL)
|
newp->w_localdir = (oldp->w_localdir == NULL)
|
||||||
? NULL : vim_strsave(oldp->w_localdir);
|
? NULL : vim_strsave(oldp->w_localdir);
|
||||||
|
newp->w_prevdir = (oldp->w_prevdir == NULL)
|
||||||
|
? NULL : vim_strsave(oldp->w_prevdir);
|
||||||
|
|
||||||
// copy tagstack and folds
|
// copy tagstack and folds
|
||||||
for (i = 0; i < oldp->w_tagstacklen; i++) {
|
for (i = 0; i < oldp->w_tagstacklen; i++) {
|
||||||
|
Reference in New Issue
Block a user