mirror of
https://github.com/neovim/neovim.git
synced 2025-12-06 14:42:35 +00:00
'viewoptions': add "curdir" flag #7447
The flag enables the current local directory set by ":lcd" to be saved to views which is the current default behaviour. The option can be removed to disable this behaviour. closes #7435 vim-patch:8.0.1289
This commit is contained in:
committed by
Justin M. Keyes
parent
f185c739bc
commit
a6de144c3e
@@ -9356,15 +9356,18 @@ put_view (
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Local directory.
|
||||
*/
|
||||
if (wp->w_localdir != NULL) {
|
||||
//
|
||||
// Local directory, if the current flag is not view options or the "curdir"
|
||||
// option is included.
|
||||
//
|
||||
if (wp->w_localdir != NULL
|
||||
&& (flagp != &vop_flags || (*flagp & SSOP_CURDIR))) {
|
||||
if (fputs("lcd ", fd) < 0
|
||||
|| ses_put_fname(fd, wp->w_localdir, flagp) == FAIL
|
||||
|| put_eol(fd) == FAIL)
|
||||
|| put_eol(fd) == FAIL) {
|
||||
return FAIL;
|
||||
did_lcd = TRUE;
|
||||
}
|
||||
did_lcd = true;
|
||||
}
|
||||
|
||||
return OK;
|
||||
|
||||
Reference in New Issue
Block a user