comparison src/ex_docmd.c @ 9667:c27052511998 v7.4.2110

commit https://github.com/vim/vim/commit/eac784eced501c54d2c99e18a1af96cd996f3a6c Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jul 28 22:08:24 2016 +0200 patch 7.4.2110 Problem: When there is an CmdUndefined autocmd then the error for a missing command is E464 instead of E492. (Manuel Ortega) Solution: Don't let the pointer be NULL.
author Christian Brabandt <cb@256bit.org>
date Thu, 28 Jul 2016 22:15:06 +0200
parents fd9727ae3c49
children 1f33aece8e55
comparison
equal deleted inserted replaced
9666:d190f1077a34 9667:c27052511998
2341 p = vim_strnsave(ea.cmd, (int)(p - ea.cmd)); 2341 p = vim_strnsave(ea.cmd, (int)(p - ea.cmd));
2342 ret = apply_autocmds(EVENT_CMDUNDEFINED, p, p, TRUE, NULL); 2342 ret = apply_autocmds(EVENT_CMDUNDEFINED, p, p, TRUE, NULL);
2343 vim_free(p); 2343 vim_free(p);
2344 /* If the autocommands did something and didn't cause an error, try 2344 /* If the autocommands did something and didn't cause an error, try
2345 * finding the command again. */ 2345 * finding the command again. */
2346 p = (ret && !aborting()) ? find_command(&ea, NULL) : NULL; 2346 p = (ret && !aborting()) ? find_command(&ea, NULL) : ea.cmd;
2347 } 2347 }
2348 #endif 2348 #endif
2349 2349
2350 #ifdef FEAT_USR_CMDS 2350 #ifdef FEAT_USR_CMDS
2351 if (p == NULL) 2351 if (p == NULL)