diff options
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r-- | src/nvim/ex_docmd.c | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 35b62cdd47..3c57537397 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -73,8 +73,8 @@ #include "nvim/os/time.h" #include "nvim/ex_cmds_defs.h" #include "nvim/mouse.h" -#include "nvim/os/rstream.h" -#include "nvim/os/wstream.h" +#include "nvim/event/rstream.h" +#include "nvim/event/wstream.h" static int quitmore = 0; static int ex_pressedreturn = FALSE; @@ -144,7 +144,6 @@ struct dbg_stuff { #endif # define ex_gui ex_nogui -# define ex_tearoff ex_ni # define ex_popup ex_ni # define ex_simalt ex_ni # define gui_mch_find_dialog ex_ni @@ -2402,9 +2401,8 @@ static char_u *find_command(exarg_T *eap, int *full) break; } - /* Look for a user defined command as a last resort. Let ":Print" be - * overruled by a user defined command. */ - if ((eap->cmdidx == CMD_SIZE || eap->cmdidx == CMD_Print) + // Look for a user defined command as a last resort. + if ((eap->cmdidx == CMD_SIZE) && *eap->cmd >= 'A' && *eap->cmd <= 'Z') { /* User defined commands may contain digits. */ while (ASCII_ISALNUM(*p)) @@ -3276,7 +3274,7 @@ set_one_cmd_context ( case CMD_imenu: case CMD_inoremenu: case CMD_iunmenu: case CMD_cmenu: case CMD_cnoremenu: case CMD_cunmenu: case CMD_tmenu: case CMD_tunmenu: - case CMD_popup: case CMD_tearoff: case CMD_emenu: + case CMD_popup: case CMD_emenu: return set_context_in_menu_cmd(xp, cmd, arg, forceit); case CMD_colorscheme: @@ -6835,12 +6833,6 @@ void ex_cd(exarg_T *eap) { if (allbuf_locked()) return; - if (vim_strchr(p_cpo, CPO_CHDIR) != NULL && curbufIsChanged() - && !eap->forceit) { - EMSG(_( - "E747: Cannot change directory, buffer is modified (add ! to override)")); - return; - } /* ":cd -": Change to previous directory */ if (STRCMP(new_dir, "-") == 0) { @@ -7555,8 +7547,9 @@ static void ex_mkrc(exarg_T *eap) int vim_mkdir_emsg(char_u *name, int prot) { - if (os_mkdir((char *)name, prot) != 0) { - EMSG2(_("E739: Cannot create directory: %s"), name); + int ret; + if ((ret = os_mkdir((char *)name, prot)) != 0) { + EMSG3(_(e_mkdir), name, os_strerror(ret)); return FAIL; } return OK; |