mirror of
https://github.com/neovim/neovim.git
synced 2025-10-16 06:46:07 +00:00
vim-patch:7.4.213
Problem: It's not possible to open a new buffer without creating a swap file. Solution: Add the ":noswapfile" modifier. (Christian Brabandt) https://code.google.com/p/vim/source/detail?r=e25a04c1c515e6eb32197291472f89bcadfabf89
This commit is contained in:

committed by
Thiago de Arruda

parent
965f587061
commit
824d64cb18
@@ -1400,15 +1400,21 @@ void *cookie; /*argument for fgetline() */
|
||||
cmdmod.split |= WSP_ABOVE;
|
||||
continue;
|
||||
|
||||
case 'n': if (!checkforcmd(&ea.cmd, "noautocmd", 3))
|
||||
break;
|
||||
if (cmdmod.save_ei == NULL) {
|
||||
/* Set 'eventignore' to "all". Restore the
|
||||
* existing option value later. */
|
||||
cmdmod.save_ei = vim_strsave(p_ei);
|
||||
set_string_option_direct((char_u *)"ei", -1,
|
||||
(char_u *)"all", OPT_FREE, SID_NONE);
|
||||
case 'n':
|
||||
if (checkforcmd(&ea.cmd, "noautocmd", 3)) {
|
||||
if (cmdmod.save_ei == NULL) {
|
||||
/* Set 'eventignore' to "all". Restore the
|
||||
* existing option value later. */
|
||||
cmdmod.save_ei = vim_strsave(p_ei);
|
||||
set_string_option_direct(
|
||||
(char_u *)"ei", -1, (char_u *)"all", OPT_FREE, SID_NONE);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (!checkforcmd(&ea.cmd, "noswapfile", 6)) {
|
||||
break;
|
||||
}
|
||||
cmdmod.noswapfile = true;
|
||||
continue;
|
||||
|
||||
case 'r': if (!checkforcmd(&ea.cmd, "rightbelow", 6))
|
||||
@@ -1991,6 +1997,8 @@ void *cookie; /*argument for fgetline() */
|
||||
case CMD_let:
|
||||
case CMD_lockmarks:
|
||||
case CMD_match:
|
||||
case CMD_noautocmd:
|
||||
case CMD_noswapfile:
|
||||
case CMD_psearch:
|
||||
case CMD_return:
|
||||
case CMD_rightbelow:
|
||||
@@ -2414,6 +2422,7 @@ static struct cmdmod {
|
||||
{"leftabove", 5, FALSE},
|
||||
{"lockmarks", 3, FALSE},
|
||||
{"noautocmd", 3, FALSE},
|
||||
{"noswapfile", 3, FALSE},
|
||||
{"rightbelow", 6, FALSE},
|
||||
{"sandbox", 3, FALSE},
|
||||
{"silent", 3, FALSE},
|
||||
@@ -2851,6 +2860,8 @@ set_one_cmd_context (
|
||||
case CMD_keeppatterns:
|
||||
case CMD_leftabove:
|
||||
case CMD_lockmarks:
|
||||
case CMD_noautocmd:
|
||||
case CMD_noswapfile:
|
||||
case CMD_rightbelow:
|
||||
case CMD_sandbox:
|
||||
case CMD_silent:
|
||||
|
Reference in New Issue
Block a user