mirror of
https://github.com/neovim/neovim.git
synced 2025-10-08 19:06:31 +00:00
vim-patch:8.2.1898: command modifier parsing always uses global cmdmod
Problem: Command modifier parsing always uses global cmdmod.
Solution: Pass in cmdmod_T to use. Rename struct fields consistently.
e100440158
This commit is contained in:
@@ -264,7 +264,7 @@ int ml_open(buf_T *buf)
|
||||
buf->b_ml.ml_chunksize = NULL;
|
||||
buf->b_ml.ml_usedchunks = 0;
|
||||
|
||||
if (cmdmod.noswapfile) {
|
||||
if (cmdmod.cmod_flags & CMOD_NOSWAPFILE) {
|
||||
buf->b_p_swf = false;
|
||||
}
|
||||
|
||||
@@ -391,7 +391,7 @@ void ml_setname(buf_T *buf)
|
||||
* When 'updatecount' is 0 and 'noswapfile' there is no swap file.
|
||||
* For help files we will make a swap file now.
|
||||
*/
|
||||
if (p_uc != 0 && !cmdmod.noswapfile) {
|
||||
if (p_uc != 0 && (cmdmod.cmod_flags & CMOD_NOSWAPFILE) == 0) {
|
||||
ml_open_file(buf); // create a swap file
|
||||
}
|
||||
return;
|
||||
@@ -475,7 +475,8 @@ void ml_open_file(buf_T *buf)
|
||||
char_u *dirp;
|
||||
|
||||
mfp = buf->b_ml.ml_mfp;
|
||||
if (mfp == NULL || mfp->mf_fd >= 0 || !buf->b_p_swf || cmdmod.noswapfile
|
||||
if (mfp == NULL || mfp->mf_fd >= 0 || !buf->b_p_swf
|
||||
|| (cmdmod.cmod_flags & CMOD_NOSWAPFILE)
|
||||
|| buf->terminal) {
|
||||
return; // nothing to do
|
||||
}
|
||||
|
Reference in New Issue
Block a user