Patch 7.4.1222
Problem:    ":normal" command and others missing in tiny build.
Solution:   Graduate FEAT_EX_EXTRA.
Files:      src/feature.h, src/charset.c, src/eval.c, src/ex_cmds.c,
            src/ex_cmds2.c, src/ex_docmd.c, src/ex_getln.c, src/getchar.c,
            src/normal.c, src/ui.c, src/version.c, src/globals.h


*** ../vim-7.4.1221/src/feature.h       2016-01-30 23:20:28.531140989 +0100
--- src/feature.h       2016-01-31 14:39:03.497862100 +0100
***************
*** 254,266 ****
  #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.
   */
  #ifdef FEAT_NORMAL
--- 254,259 ----
*** ../vim-7.4.1221/src/charset.c       2016-01-30 15:14:02.535448954 +0100
--- src/charset.c       2016-01-31 14:39:49.361384381 +0100
***************
*** 822,835 ****
      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
--- 822,832 ----
***************
*** 1568,1574 ****
  }
  #endif
  
- #if defined(FEAT_EX_EXTRA) || defined(PROTO)
  /*
   * skip to bin digit (or NUL after the string)
   */
--- 1565,1570 ----
***************
*** 1607,1613 ****
        ++p;
      return p;
  }
- #endif
  
  /*
   * Variant of isdigit() that can handle characters > 0x100.
--- 1603,1608 ----
*** ../vim-7.4.1221/src/eval.c  2016-01-30 23:20:28.531140989 +0100
--- src/eval.c  2016-01-31 14:40:29.092970559 +0100
***************
*** 12855,12863 ****
        "emacs_tags",
  #endif
        "eval",     /* always present, of course! */
! #ifdef FEAT_EX_EXTRA
!       "ex_extra",
! #endif
  #ifdef FEAT_SEARCH_EXTRA
        "extra_search",
  #endif
--- 12855,12861 ----
        "emacs_tags",
  #endif
        "eval",     /* always present, of course! */
!       "ex_extra", /* graduated feature */
  #ifdef FEAT_SEARCH_EXTRA
        "extra_search",
  #endif
***************
*** 13684,13699 ****
  
        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
--- 13682,13693 ----
*** ../vim-7.4.1221/src/ex_cmds.c       2016-01-31 14:13:18.113955970 +0100
--- src/ex_cmds.c       2016-01-31 14:40:57.252677277 +0100
***************
*** 18,26 ****
  # 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        *);
--- 18,24 ----
***************
*** 138,144 ****
      msg(IObuff);
  }
  
- #if defined(FEAT_EX_EXTRA) || defined(PROTO)
  /*
   * ":left", ":center" and ":right": align text.
   */
--- 136,141 ----
***************
*** 787,793 ****
  
      u_clearline();
  }
- #endif
  
  /*
   * :move command - move lines line1-line2 to line dest
--- 784,789 ----
***************
*** 6577,6583 ****
      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);
  
  /*
--- 6573,6578 ----
***************
*** 6962,6968 ****
      ga_clear(&ga);
      fclose(fd_tags);      /* there is no check for an error... */
  }
- #endif
  
  #if defined(FEAT_SIGNS) || defined(PROTO)
  
--- 6957,6962 ----
*** ../vim-7.4.1221/src/ex_cmds2.c      2016-01-30 15:52:42.571439521 +0100
--- src/ex_cmds2.c      2016-01-31 14:41:24.664391795 +0100
***************
*** 90,98 ****
      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;
--- 90,96 ----
***************
*** 161,170 ****
         * 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);
--- 159,166 ----
***************
*** 180,188 ****
            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();
--- 176,182 ----
*** ../vim-7.4.1221/src/ex_docmd.c      2016-01-30 23:20:28.531140989 +0100
--- src/ex_docmd.c      2016-01-31 14:46:49.677007716 +0100
***************
*** 344,361 ****
  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);
--- 344,351 ----
***************
*** 659,672 ****
      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;
--- 649,660 ----
***************
*** 9860,9866 ****
      update_curswant();
  }
  
- #if defined(FEAT_EX_EXTRA) || defined(PROTO)
  /*
   * ":normal[!] {commands}": Execute normal mode commands.
   */
--- 9848,9853 ----
***************
*** 10062,10070 ****
      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.
--- 10049,10055 ----
***************
*** 10076,10085 ****
      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.
   */
--- 10061,10067 ----
***************
*** 10097,10103 ****
        normal_cmd(&oa, TRUE);  /* execute a Normal mode cmd */
      }
  }
- #endif
  
  #ifdef FEAT_FIND_ID
      static void
--- 10079,10084 ----
*** ../vim-7.4.1221/src/ex_getln.c      2016-01-30 15:52:42.575439480 +0100
--- src/ex_getln.c      2016-01-31 14:47:15.976733942 +0100
***************
*** 1129,1138 ****
                /* 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
!                  )
                    goto cmdline_not_changed;
  
                gotesc = TRUE;          /* will free ccline.cmdbuff after
--- 1129,1135 ----
                /* In exmode it doesn't make sense to return.  Except when
                 * ":normal" runs out of characters. */
                if (exmode_active
!                              && (ex_normal_busy == 0 || typebuf.tb_len > 0))
                    goto cmdline_not_changed;
  
                gotesc = TRUE;          /* will free ccline.cmdbuff after
*** ../vim-7.4.1221/src/getchar.c       2016-01-30 16:39:20.430376564 +0100
--- src/getchar.c       2016-01-31 14:48:14.228127586 +0100
***************
*** 1356,1363 ****
  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.
   */
--- 1356,1361 ----
***************
*** 1406,1412 ****
      set_input_buf(tp->save_inputbuf);
  # endif
  }
- #endif
  
  /*
   * Open a new script file for the ":source!" command.
--- 1404,1409 ----
***************
*** 1981,1991 ****
       * 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
!           )
        return NUL;
  
      local_State = get_real_state();
--- 1978,1984 ----
       * 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 && ex_normal_busy == 0)
        return NUL;
  
      local_State = get_real_state();
***************
*** 2605,2613 ****
                        && 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
--- 2598,2604 ----
***************
*** 2729,2740 ****
                    continue;
                }
  
- #ifdef FEAT_EX_EXTRA
                if (ex_normal_busy > 0)
                {
! # ifdef FEAT_CMDWIN
                    static int tc = 0;
! # endif
  
                    /* No typeahead left and inside ":normal".  Must return
                     * something to avoid getting stuck.  When an incomplete
--- 2720,2730 ----
                    continue;
                }
  
                if (ex_normal_busy > 0)
                {
! #ifdef FEAT_CMDWIN
                    static int tc = 0;
! #endif
  
                    /* No typeahead left and inside ":normal".  Must return
                     * something to avoid getting stuck.  When an incomplete
***************
*** 2753,2771 ****
                    if (p_im && (State & INSERT))
                        c = Ctrl_L;
                    else if ((State & CMDLINE)
! # ifdef FEAT_CMDWIN
                            || (cmdwin_type > 0 && tc == ESC)
! # endif
                            )
                        c = Ctrl_C;
                    else
                        c = ESC;
! # ifdef FEAT_CMDWIN
                    tc = c;
! # endif
                    break;
                }
- #endif
  
  /*
   * get a character: 3. from the user - update display
--- 2743,2760 ----
                    if (p_im && (State & INSERT))
                        c = Ctrl_L;
                    else if ((State & CMDLINE)
! #ifdef FEAT_CMDWIN
                            || (cmdwin_type > 0 && tc == ESC)
! #endif
                            )
                        c = Ctrl_C;
                    else
                        c = ESC;
! #ifdef FEAT_CMDWIN
                    tc = c;
! #endif
                    break;
                }
  
  /*
   * get a character: 3. from the user - update display
***************
*** 4638,4655 ****
      /* 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;
--- 4627,4640 ----
*** ../vim-7.4.1221/src/normal.c        2016-01-30 19:39:45.281838574 +0100
--- src/normal.c        2016-01-31 14:48:29.971963712 +0100
***************
*** 8924,8934 ****
  
      /* 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
!           )
        restart_edit = 'a';
  }
  
--- 8924,8930 ----
  
      /* 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() && ex_normal_busy == 0)
        restart_edit = 'a';
  }
  
*** ../vim-7.4.1221/src/ui.c    2016-01-30 21:10:05.009342495 +0100
--- src/ui.c    2016-01-31 14:48:53.611717658 +0100
***************
*** 1580,1586 ****
  }
  #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.
--- 1580,1585 ----
***************
*** 1624,1630 ****
        vim_free(gap);
      }
  }
- #endif
  
  #if defined(FEAT_GUI) \
        || defined(FEAT_MOUSE_GPM) || defined(FEAT_SYSMOUSE) \
--- 1623,1628 ----
***************
*** 1701,1715 ****
  }
  #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
--- 1699,1710 ----
*** ../vim-7.4.1221/src/version.c       2016-01-31 14:36:53.419217174 +0100
--- src/version.c       2016-01-31 14:49:11.627530146 +0100
***************
*** 221,231 ****
  #else
        "-eval",
  #endif
- #ifdef FEAT_EX_EXTRA
        "+ex_extra",
- #else
-       "-ex_extra",
- #endif
  #ifdef FEAT_SEARCH_EXTRA
        "+extra_search",
  #else
--- 221,227 ----
***************
*** 747,752 ****
--- 743,750 ----
  static int included_patches[] =
  {   /* Add new patch number below this line */
  /**/
+     1222,
+ /**/
      1221,
  /**/
      1220,
*** ../vim-7.4.1221/src/globals.h       2016-01-29 23:20:35.313308119 +0100
--- src/globals.h       2016-01-31 14:49:56.023068081 +0100
***************
*** 995,1004 ****
                    = {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
--- 995,1002 ----
***************
*** 1573,1581 ****
  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))
--- 1571,1577 ----
*** ../vim-7.4.1221/src/version.c       2016-01-31 14:36:53.419217174 +0100
--- src/version.c       2016-01-31 14:49:11.627530146 +0100
***************
*** 222,230 ****
        "-eval",
  #endif
- #ifdef FEAT_EX_EXTRA
        "+ex_extra",
- #else
-       "-ex_extra",
- #endif
  #ifdef FEAT_SEARCH_EXTRA
        "+extra_search",
--- 222,226 ----
***************
*** 748,749 ****
--- 744,747 ----
  {   /* Add new patch number below this line */
+ /**/
+     1222,
  /**/

-- 
>From "know your smileys":
 :-{}   Too much lipstick

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui