Mercurial > vim
comparison src/ex_docmd.c @ 7850:10f17a228661 v7.4.1222
commit https://github.com/vim/vim/commit/e2c3810c2ae290bbc2cba18eb47cc2d44e4b9797
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jan 31 14:55:40 2016 +0100
patch 7.4.1222
Problem: ":normal" command and others missing in tiny build.
Solution: Graduate FEAT_EX_EXTRA.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 31 Jan 2016 15:00:05 +0100 |
parents | 28f569c7dab9 |
children | 6b0891de44a9 |
comparison
equal
deleted
inserted
replaced
7849:d1de94f57ec9 | 7850:10f17a228661 |
---|---|
342 static void ex_mark(exarg_T *eap); | 342 static void ex_mark(exarg_T *eap); |
343 #ifdef FEAT_USR_CMDS | 343 #ifdef FEAT_USR_CMDS |
344 static char_u *uc_fun_cmd(void); | 344 static char_u *uc_fun_cmd(void); |
345 static char_u *find_ucmd(exarg_T *eap, char_u *p, int *full, expand_T *xp, int *compl); | 345 static char_u *find_ucmd(exarg_T *eap, char_u *p, int *full, expand_T *xp, int *compl); |
346 #endif | 346 #endif |
347 #ifdef FEAT_EX_EXTRA | |
348 static void ex_startinsert(exarg_T *eap); | 347 static void ex_startinsert(exarg_T *eap); |
349 static void ex_stopinsert(exarg_T *eap); | 348 static void ex_stopinsert(exarg_T *eap); |
350 #else | |
351 # define ex_normal ex_ni | |
352 # define ex_align ex_ni | |
353 # define ex_retab ex_ni | |
354 # define ex_startinsert ex_ni | |
355 # define ex_stopinsert ex_ni | |
356 # define ex_helptags ex_ni | |
357 # define ex_sort ex_ni | |
358 #endif | |
359 #ifdef FEAT_FIND_ID | 349 #ifdef FEAT_FIND_ID |
360 static void ex_checkpath(exarg_T *eap); | 350 static void ex_checkpath(exarg_T *eap); |
361 static void ex_findpat(exarg_T *eap); | 351 static void ex_findpat(exarg_T *eap); |
362 #else | 352 #else |
363 # define ex_findpat ex_ni | 353 # define ex_findpat ex_ni |
657 #endif | 647 #endif |
658 | 648 |
659 MSG(_("Entering Ex mode. Type \"visual\" to go to Normal mode.")); | 649 MSG(_("Entering Ex mode. Type \"visual\" to go to Normal mode.")); |
660 while (exmode_active) | 650 while (exmode_active) |
661 { | 651 { |
662 #ifdef FEAT_EX_EXTRA | |
663 /* Check for a ":normal" command and no more characters left. */ | 652 /* Check for a ":normal" command and no more characters left. */ |
664 if (ex_normal_busy > 0 && typebuf.tb_len == 0) | 653 if (ex_normal_busy > 0 && typebuf.tb_len == 0) |
665 { | 654 { |
666 exmode_active = FALSE; | 655 exmode_active = FALSE; |
667 break; | 656 break; |
668 } | 657 } |
669 #endif | |
670 msg_scroll = TRUE; | 658 msg_scroll = TRUE; |
671 need_wait_return = FALSE; | 659 need_wait_return = FALSE; |
672 ex_pressedreturn = FALSE; | 660 ex_pressedreturn = FALSE; |
673 ex_no_reprint = FALSE; | 661 ex_no_reprint = FALSE; |
674 changedtick = curbuf->b_changedtick; | 662 changedtick = curbuf->b_changedtick; |
9858 if (!curwin->w_p_wrap) | 9846 if (!curwin->w_p_wrap) |
9859 validate_cursor(); | 9847 validate_cursor(); |
9860 update_curswant(); | 9848 update_curswant(); |
9861 } | 9849 } |
9862 | 9850 |
9863 #if defined(FEAT_EX_EXTRA) || defined(PROTO) | |
9864 /* | 9851 /* |
9865 * ":normal[!] {commands}": Execute normal mode commands. | 9852 * ":normal[!] {commands}": Execute normal mode commands. |
9866 */ | 9853 */ |
9867 void | 9854 void |
9868 ex_normal(exarg_T *eap) | 9855 ex_normal(exarg_T *eap) |
10060 ex_stopinsert(exarg_T *eap UNUSED) | 10047 ex_stopinsert(exarg_T *eap UNUSED) |
10061 { | 10048 { |
10062 restart_edit = 0; | 10049 restart_edit = 0; |
10063 stop_insert_mode = TRUE; | 10050 stop_insert_mode = TRUE; |
10064 } | 10051 } |
10065 #endif | 10052 |
10066 | |
10067 #if defined(FEAT_EX_EXTRA) || defined(FEAT_MENU) || defined(PROTO) | |
10068 /* | 10053 /* |
10069 * Execute normal mode command "cmd". | 10054 * Execute normal mode command "cmd". |
10070 * "remap" can be REMAP_NONE or REMAP_YES. | 10055 * "remap" can be REMAP_NONE or REMAP_YES. |
10071 */ | 10056 */ |
10072 void | 10057 void |
10074 { | 10059 { |
10075 /* Stuff the argument into the typeahead buffer. */ | 10060 /* Stuff the argument into the typeahead buffer. */ |
10076 ins_typebuf(cmd, remap, 0, TRUE, silent); | 10061 ins_typebuf(cmd, remap, 0, TRUE, silent); |
10077 exec_normal(FALSE); | 10062 exec_normal(FALSE); |
10078 } | 10063 } |
10079 #endif | 10064 |
10080 | |
10081 #if defined(FEAT_EX_EXTRA) || defined(FEAT_MENU) || defined(FEAT_EVAL) \ | |
10082 || defined(PROTO) | |
10083 /* | 10065 /* |
10084 * Execute normal_cmd() until there is no typeahead left. | 10066 * Execute normal_cmd() until there is no typeahead left. |
10085 */ | 10067 */ |
10086 void | 10068 void |
10087 exec_normal(int was_typed) | 10069 exec_normal(int was_typed) |
10095 { | 10077 { |
10096 update_topline_cursor(); | 10078 update_topline_cursor(); |
10097 normal_cmd(&oa, TRUE); /* execute a Normal mode cmd */ | 10079 normal_cmd(&oa, TRUE); /* execute a Normal mode cmd */ |
10098 } | 10080 } |
10099 } | 10081 } |
10100 #endif | |
10101 | 10082 |
10102 #ifdef FEAT_FIND_ID | 10083 #ifdef FEAT_FIND_ID |
10103 static void | 10084 static void |
10104 ex_checkpath(exarg_T *eap) | 10085 ex_checkpath(exarg_T *eap) |
10105 { | 10086 { |