]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 7.4.1222 v7.4.1222
authorBram Moolenaar <Bram@vim.org>
Sun, 31 Jan 2016 13:55:40 +0000 (14:55 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 31 Jan 2016 13:55:40 +0000 (14:55 +0100)
Problem:    ":normal" command and others missing in tiny build.
Solution:   Graduate FEAT_EX_EXTRA.

12 files changed:
src/charset.c
src/eval.c
src/ex_cmds.c
src/ex_cmds2.c
src/ex_docmd.c
src/ex_getln.c
src/feature.h
src/getchar.c
src/globals.h
src/normal.c
src/ui.c
src/version.c

index 538d82115a9d64d5575ed2ef3f2598cbbdc9ab13..2414b2a4012d46fc695338c4e183851ce59faac6 100644 (file)
@@ -822,14 +822,11 @@ vim_strnsize(char_u *s, int len)
     else \
        return ptr2cells(p);
 
-#if defined(FEAT_VREPLACE) || defined(FEAT_EX_EXTRA) || defined(FEAT_GUI) \
-       || defined(FEAT_VIRTUALEDIT) || defined(PROTO)
     int
 chartabsize(char_u *p, colnr_T col)
 {
     RET_WIN_BUF_CHARTABSIZE(curwin, curbuf, p, col)
 }
-#endif
 
 #ifdef FEAT_LINEBREAK
     static int
@@ -1568,7 +1565,6 @@ skiphex(char_u *q)
 }
 #endif
 
-#if defined(FEAT_EX_EXTRA) || defined(PROTO)
 /*
  * skip to bin digit (or NUL after the string)
  */
@@ -1607,7 +1603,6 @@ skiptohex(char_u *q)
        ++p;
     return p;
 }
-#endif
 
 /*
  * Variant of isdigit() that can handle characters > 0x100.
index 767925193a8638a946c1313093f7c66dfb7b6082..d2ebeb971af581a890393c5b92982d637570393f 100644 (file)
@@ -12855,9 +12855,7 @@ f_has(typval_T *argvars, typval_T *rettv)
        "emacs_tags",
 #endif
        "eval",     /* always present, of course! */
-#ifdef FEAT_EX_EXTRA
-       "ex_extra",
-#endif
+       "ex_extra", /* graduated feature */
 #ifdef FEAT_SEARCH_EXTRA
        "extra_search",
 #endif
@@ -13684,16 +13682,12 @@ get_user_input(
 
        if (defstr != NULL)
        {
-# ifdef FEAT_EX_EXTRA
            int save_ex_normal_busy = ex_normal_busy;
            ex_normal_busy = 0;
-# endif
            rettv->vval.v_string =
                getcmdline_prompt(inputsecret_flag ? NUL : '@', p, echo_attr,
                                  xp_type, xp_arg);
-# ifdef FEAT_EX_EXTRA
            ex_normal_busy = save_ex_normal_busy;
-# endif
        }
        if (inputdialog && rettv->vval.v_string == NULL
                && argvars[1].v_type != VAR_UNKNOWN
index 66f1fa6c41d59774da9c1a0f84f8bc5317e040ec..3efdf8bbbbf4138c04fca0909346123a0a5b2fbc 100644 (file)
@@ -18,9 +18,7 @@
 # include <float.h>
 #endif
 
-#ifdef FEAT_EX_EXTRA
 static int linelen(int *has_tab);
-#endif
 static void do_filter(linenr_T line1, linenr_T line2, exarg_T *eap, char_u *cmd, int do_in, int do_out);
 #ifdef FEAT_VIMINFO
 static char_u *viminfo_filename(char_u *);
@@ -138,7 +136,6 @@ do_ascii(exarg_T *eap UNUSED)
     msg(IObuff);
 }
 
-#if defined(FEAT_EX_EXTRA) || defined(PROTO)
 /*
  * ":left", ":center" and ":right": align text.
  */
@@ -787,7 +784,6 @@ ex_retab(exarg_T *eap)
 
     u_clearline();
 }
-#endif
 
 /*
  * :move command - move lines line1-line2 to line dest
@@ -6577,7 +6573,6 @@ ex_viusage(exarg_T *eap UNUSED)
     do_cmdline_cmd((char_u *)"help normal-index");
 }
 
-#if defined(FEAT_EX_EXTRA) || defined(PROTO)
 static void helptags_one(char_u *dir, char_u *ext, char_u *lang, int add_help_tags);
 
 /*
@@ -6962,7 +6957,6 @@ helptags_one(
     ga_clear(&ga);
     fclose(fd_tags);       /* there is no check for an error... */
 }
-#endif
 
 #if defined(FEAT_SIGNS) || defined(PROTO)
 
index c1adea4c77fbb7ee3c5a21b57edeb371033143d1..2651770a61baf801cefc0479dabfd27fa8968f8a 100644 (file)
@@ -90,9 +90,7 @@ do_debug(char_u *cmd)
     tasave_T   typeaheadbuf;
     int                typeahead_saved = FALSE;
     int                save_ignore_script = 0;
-# ifdef FEAT_EX_EXTRA
     int                save_ex_normal_busy;
-# endif
     int                n;
     char_u     *cmdline = NULL;
     char_u     *p;
@@ -161,10 +159,8 @@ do_debug(char_u *cmd)
         * with the commands being executed.  Reset "ex_normal_busy" to avoid
         * the side effects of using ":normal". Save the stuff buffer and make
         * it empty. Set ignore_script to avoid reading from script input. */
-# ifdef FEAT_EX_EXTRA
        save_ex_normal_busy = ex_normal_busy;
        ex_normal_busy = 0;
-# endif
        if (!debug_greedy)
        {
            save_typeahead(&typeaheadbuf);
@@ -180,9 +176,7 @@ do_debug(char_u *cmd)
            restore_typeahead(&typeaheadbuf);
            ignore_script = save_ignore_script;
        }
-# ifdef FEAT_EX_EXTRA
        ex_normal_busy = save_ex_normal_busy;
-# endif
 
        cmdline_row = msg_row;
        msg_starthere();
index 24df1d17bf3c09f6ed5a0d18aec8e5c79e4a9acf..028af35c66d8d43dc96a685471d697cc2e30b88c 100644 (file)
@@ -344,18 +344,8 @@ static void        ex_mark(exarg_T *eap);
 static char_u  *uc_fun_cmd(void);
 static char_u  *find_ucmd(exarg_T *eap, char_u *p, int *full, expand_T *xp, int *compl);
 #endif
-#ifdef FEAT_EX_EXTRA
 static void    ex_startinsert(exarg_T *eap);
 static void    ex_stopinsert(exarg_T *eap);
-#else
-# define ex_normal             ex_ni
-# define ex_align              ex_ni
-# define ex_retab              ex_ni
-# define ex_startinsert                ex_ni
-# define ex_stopinsert         ex_ni
-# define ex_helptags           ex_ni
-# define ex_sort               ex_ni
-#endif
 #ifdef FEAT_FIND_ID
 static void    ex_checkpath(exarg_T *eap);
 static void    ex_findpat(exarg_T *eap);
@@ -659,14 +649,12 @@ do_exmode(
     MSG(_("Entering Ex mode.  Type \"visual\" to go to Normal mode."));
     while (exmode_active)
     {
-#ifdef FEAT_EX_EXTRA
        /* Check for a ":normal" command and no more characters left. */
        if (ex_normal_busy > 0 && typebuf.tb_len == 0)
        {
            exmode_active = FALSE;
            break;
        }
-#endif
        msg_scroll = TRUE;
        need_wait_return = FALSE;
        ex_pressedreturn = FALSE;
@@ -9860,7 +9848,6 @@ update_topline_cursor(void)
     update_curswant();
 }
 
-#if defined(FEAT_EX_EXTRA) || defined(PROTO)
 /*
  * ":normal[!] {commands}": Execute normal mode commands.
  */
@@ -10062,9 +10049,7 @@ ex_stopinsert(exarg_T *eap UNUSED)
     restart_edit = 0;
     stop_insert_mode = TRUE;
 }
-#endif
 
-#if defined(FEAT_EX_EXTRA) || defined(FEAT_MENU) || defined(PROTO)
 /*
  * Execute normal mode command "cmd".
  * "remap" can be REMAP_NONE or REMAP_YES.
@@ -10076,10 +10061,7 @@ exec_normal_cmd(char_u *cmd, int remap, int silent)
     ins_typebuf(cmd, remap, 0, TRUE, silent);
     exec_normal(FALSE);
 }
-#endif
 
-#if defined(FEAT_EX_EXTRA) || defined(FEAT_MENU) || defined(FEAT_EVAL) \
-       || defined(PROTO)
 /*
  * Execute normal_cmd() until there is no typeahead left.
  */
@@ -10097,7 +10079,6 @@ exec_normal(int was_typed)
        normal_cmd(&oa, TRUE);  /* execute a Normal mode cmd */
     }
 }
-#endif
 
 #ifdef FEAT_FIND_ID
     static void
index 9a49f9f4fad091f5195075bd26e5937ef1ecd3a6..b70755e92ebe8d92f5c67c52052fbef72a8f7b6c 100644 (file)
@@ -1129,10 +1129,7 @@ getcmdline(
                /* In exmode it doesn't make sense to return.  Except when
                 * ":normal" runs out of characters. */
                if (exmode_active
-#ifdef FEAT_EX_EXTRA
-                       && (ex_normal_busy == 0 || typebuf.tb_len > 0)
-#endif
-                  )
+                              && (ex_normal_busy == 0 || typebuf.tb_len > 0))
                    goto cmdline_not_changed;
 
                gotesc = TRUE;          /* will free ccline.cmdbuff after
index f1a3a4a39b3e7bcd1f44e468aa478c488a10e8dd..ca81d8972332ab98e6021c353ca2ab0c497ff7d1 100644 (file)
 # define FEAT_LINEBREAK
 #endif
 
-/*
- * +ex_extra           ":retab", ":right", ":left", ":center", ":normal".
- */
-#if defined(FEAT_NORMAL) || defined(FEAT_CHANNEL)
-# define FEAT_EX_EXTRA
-#endif
-
 /*
  * +extra_search       'hlsearch' and 'incsearch' options.
  */
index 7a5756b8e100ffb03064d0ababe0249b25879859..12e25081279678bed7dc50de02e11cd10cd84967 100644 (file)
@@ -1356,8 +1356,6 @@ static int old_mouse_row; /* mouse_row related to old_char */
 static int old_mouse_col;      /* mouse_col related to old_char */
 #endif
 
-#if defined(FEAT_EVAL) || defined(FEAT_EX_EXTRA) || defined(PROTO)
-
 /*
  * Save all three kinds of typeahead, so that the user must type at a prompt.
  */
@@ -1406,7 +1404,6 @@ restore_typeahead(tasave_T *tp)
     set_input_buf(tp->save_inputbuf);
 # endif
 }
-#endif
 
 /*
  * Open a new script file for the ":source!" command.
@@ -1981,11 +1978,7 @@ vgetorpeek(int advance)
      * Using ":normal" can also do this, but it saves the typeahead buffer,
      * thus it should be OK.  But don't get a key from the user then.
      */
-    if (vgetc_busy > 0
-#ifdef FEAT_EX_EXTRA
-           && ex_normal_busy == 0
-#endif
-           )
+    if (vgetc_busy > 0 && ex_normal_busy == 0)
        return NUL;
 
     local_State = get_real_state();
@@ -2605,9 +2598,7 @@ vgetorpeek(int advance)
                        && typebuf.tb_len == 1
                        && typebuf.tb_buf[typebuf.tb_off] == ESC
                        && !no_mapping
-#ifdef FEAT_EX_EXTRA
                        && ex_normal_busy == 0
-#endif
                        && typebuf.tb_maplen == 0
                        && (State & INSERT)
                        && (p_timeout
@@ -2729,12 +2720,11 @@ vgetorpeek(int advance)
                    continue;
                }
 
-#ifdef FEAT_EX_EXTRA
                if (ex_normal_busy > 0)
                {
-# ifdef FEAT_CMDWIN
+#ifdef FEAT_CMDWIN
                    static int tc = 0;
-# endif
+#endif
 
                    /* No typeahead left and inside ":normal".  Must return
                     * something to avoid getting stuck.  When an incomplete
@@ -2753,19 +2743,18 @@ vgetorpeek(int advance)
                    if (p_im && (State & INSERT))
                        c = Ctrl_L;
                    else if ((State & CMDLINE)
-# ifdef FEAT_CMDWIN
+#ifdef FEAT_CMDWIN
                            || (cmdwin_type > 0 && tc == ESC)
-# endif
+#endif
                            )
                        c = Ctrl_C;
                    else
                        c = ESC;
-# ifdef FEAT_CMDWIN
+#ifdef FEAT_CMDWIN
                    tc = c;
-# endif
+#endif
                    break;
                }
-#endif
 
 /*
  * get a character: 3. from the user - update display
@@ -4638,18 +4627,14 @@ eval_map_expr(
     /* Forbid changing text or using ":normal" to avoid most of the bad side
      * effects.  Also restore the cursor position. */
     ++textlock;
-#ifdef FEAT_EX_EXTRA
     ++ex_normal_lock;
-#endif
     set_vim_var_char(c);  /* set v:char to the typed character */
     save_cursor = curwin->w_cursor;
     save_msg_col = msg_col;
     save_msg_row = msg_row;
     p = eval_to_string(expr, NULL, FALSE);
     --textlock;
-#ifdef FEAT_EX_EXTRA
     --ex_normal_lock;
-#endif
     curwin->w_cursor = save_cursor;
     msg_col = save_msg_col;
     msg_row = save_msg_row;
index 103aff66d2489a41b9b82099a491d84ed39a943c..4c1b41fede32fa3af5cd5509d2abd36c4a8795b3 100644 (file)
@@ -995,10 +995,8 @@ EXTERN typebuf_T typebuf           /* typeahead buffer */
                    = {NULL, NULL, 0, 0, 0, 0, 0, 0, 0}
 #endif
                    ;
-#ifdef FEAT_EX_EXTRA
 EXTERN int     ex_normal_busy INIT(= 0); /* recursiveness of ex_normal() */
 EXTERN int     ex_normal_lock INIT(= 0); /* forbid use of ex_normal() */
-#endif
 #ifdef FEAT_EVAL
 EXTERN int     ignore_script INIT(= FALSE);  /* ignore script input */
 #endif
@@ -1573,9 +1571,7 @@ EXTERN char_u e_maxmempat[]       INIT(= N_("E363: pattern uses more memory than 'maxm
 EXTERN char_u e_emptybuf[]     INIT(= N_("E749: empty buffer"));
 EXTERN char_u e_nobufnr[]      INIT(= N_("E86: Buffer %ld does not exist"));
 
-#ifdef FEAT_EX_EXTRA
 EXTERN char_u e_invalpat[]     INIT(= N_("E682: Invalid search pattern or delimiter"));
-#endif
 EXTERN char_u e_bufloaded[]    INIT(= N_("E139: File is loaded in another buffer"));
 #if defined(FEAT_SYN_HL) || \
        (defined(FEAT_INS_EXPAND) && defined(FEAT_COMPL_FUNC))
index 2aa068d99b8931d44dcfbfa73ebff214bd5129f1..d4b4b70fcbf03b15882c9a2b2a00705d591e7683 100644 (file)
@@ -8924,11 +8924,7 @@ nv_esc(cmdarg_T *cap)
 
     /* A CTRL-C is often used at the start of a menu.  When 'insertmode' is
      * set return to Insert mode afterwards. */
-    if (restart_edit == 0 && goto_im()
-#ifdef FEAT_EX_EXTRA
-           && ex_normal_busy == 0
-#endif
-           )
+    if (restart_edit == 0 && goto_im() && ex_normal_busy == 0)
        restart_edit = 'a';
 }
 
index 4309248dccda3850191c05b25ceaa8a7330e3099..12aa12cbde05f8ffd3e3339c7cd64fbf7af1f79d 100644 (file)
--- a/src/ui.c
+++ b/src/ui.c
@@ -1580,7 +1580,6 @@ vim_used_in_input_buf(void)
 }
 #endif
 
-#if defined(FEAT_EVAL) || defined(FEAT_EX_EXTRA) || defined(PROTO)
 /*
  * Return the current contents of the input buffer and make it empty.
  * The returned pointer must be passed to set_input_buf() later.
@@ -1624,7 +1623,6 @@ set_input_buf(char_u *p)
        vim_free(gap);
     }
 }
-#endif
 
 #if defined(FEAT_GUI) \
        || defined(FEAT_MOUSE_GPM) || defined(FEAT_SYSMOUSE) \
@@ -1701,15 +1699,12 @@ push_raw_key(char_u *s, int len)
 }
 #endif
 
-#if defined(FEAT_GUI) || defined(FEAT_EVAL) || defined(FEAT_EX_EXTRA) \
-       || defined(PROTO)
 /* Remove everything from the input buffer.  Called when ^C is found */
     void
 trash_input_buf(void)
 {
     inbufcount = 0;
 }
-#endif
 
 /*
  * Read as much data from the input buffer as possible up to maxlen, and store
index 78fdb7c46fd242b8b948eeee380d13f903642bac..b521511f4f1b950dd3c183ee1916ca45cc84f853 100644 (file)
@@ -221,11 +221,7 @@ static char *(features[]) =
 #else
        "-eval",
 #endif
-#ifdef FEAT_EX_EXTRA
        "+ex_extra",
-#else
-       "-ex_extra",
-#endif
 #ifdef FEAT_SEARCH_EXTRA
        "+extra_search",
 #else
@@ -746,6 +742,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1222,
 /**/
     1221,
 /**/