comparison src/ex_docmd.c @ 17652:9efb4dda9720

patch 8.1.1823: command line history code is spread out commit https://github.com/vim/vim/commit/d7663c22c6c1ff0f86b81371586fbc851d3a3e9e Author: Bram Moolenaar <Bram@vim.org> Date: Tue Aug 6 21:59:57 2019 +0200 patch 8.1.1823: command line history code is spread out Problem: Command line history code is spread out. Solution: Put the code in a new file. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/4779) Also graduate the +cmdline_hist feature.
author Bram Moolenaar <Bram@vim.org>
date Tue, 06 Aug 2019 22:00:08 +0200
parents a1437b8f2fac
children 10696f279e20
comparison
equal deleted inserted replaced
17651:826360df7aff 17652:9efb4dda9720
354 # define ex_nbclose ex_ni 354 # define ex_nbclose ex_ni
355 # define ex_nbkey ex_ni 355 # define ex_nbkey ex_ni
356 # define ex_nbstart ex_ni 356 # define ex_nbstart ex_ni
357 #endif 357 #endif
358 358
359 #ifndef FEAT_CMDHIST
360 # define ex_history ex_ni
361 #endif
362 #ifndef FEAT_JUMPLIST 359 #ifndef FEAT_JUMPLIST
363 # define ex_jumps ex_ni 360 # define ex_jumps ex_ni
364 # define ex_clearjumps ex_ni 361 # define ex_clearjumps ex_ni
365 # define ex_changes ex_ni 362 # define ex_changes ex_ni
366 #endif 363 #endif
983 #endif 980 #endif
984 981
985 if (next_cmdline == NULL) 982 if (next_cmdline == NULL)
986 { 983 {
987 VIM_CLEAR(cmdline_copy); 984 VIM_CLEAR(cmdline_copy);
988 #ifdef FEAT_CMDHIST 985
989 /* 986 /*
990 * If the command was typed, remember it for the ':' register. 987 * If the command was typed, remember it for the ':' register.
991 * Do this AFTER executing the command to make :@: work. 988 * Do this AFTER executing the command to make :@: work.
992 */ 989 */
993 if (getline_equal(fgetline, cookie, getexline) 990 if (getline_equal(fgetline, cookie, getexline)
995 { 992 {
996 vim_free(last_cmdline); 993 vim_free(last_cmdline);
997 last_cmdline = new_last_cmdline; 994 last_cmdline = new_last_cmdline;
998 new_last_cmdline = NULL; 995 new_last_cmdline = NULL;
999 } 996 }
1000 #endif
1001 } 997 }
1002 else 998 else
1003 { 999 {
1004 /* need to copy the command after the '|' to cmdline_copy, for the 1000 /* need to copy the command after the '|' to cmdline_copy, for the
1005 * next do_one_cmd() */ 1001 * next do_one_cmd() */
4128 case CMD_messages: 4124 case CMD_messages:
4129 xp->xp_context = EXPAND_MESSAGES; 4125 xp->xp_context = EXPAND_MESSAGES;
4130 xp->xp_pattern = arg; 4126 xp->xp_pattern = arg;
4131 break; 4127 break;
4132 4128
4133 #if defined(FEAT_CMDHIST)
4134 case CMD_history: 4129 case CMD_history:
4135 xp->xp_context = EXPAND_HISTORY; 4130 xp->xp_context = EXPAND_HISTORY;
4136 xp->xp_pattern = arg; 4131 xp->xp_pattern = arg;
4137 break; 4132 break;
4138 #endif
4139 #if defined(FEAT_PROFILE) 4133 #if defined(FEAT_PROFILE)
4140 case CMD_syntime: 4134 case CMD_syntime:
4141 xp->xp_context = EXPAND_SYNTIME; 4135 xp->xp_context = EXPAND_SYNTIME;
4142 xp->xp_pattern = arg; 4136 xp->xp_pattern = arg;
4143 break; 4137 break;