Loading ...
Sorry, an error occurred while loading the content.

Patch 5.6.063

Expand Messages
  • Bram Moolenaar
    Patch 5.6.063 Problem: Using I in Visual-block mode doesn t accept a count. (Johannes Zellner) Solution: Pass the count on to do_insert() and edit().
    Message 1 of 1 , Apr 12, 2000
    • 0 Attachment
      Patch 5.6.063
      Problem: Using "I" in Visual-block mode doesn't accept a count. (Johannes
      Zellner)
      Solution: Pass the count on to do_insert() and edit(). (Allan Kelly)
      Files: src/normal.c, src/ops.c, src/proto/ops.pro


      *** ../vim-5.6.62/src/normal.c Wed Apr 5 14:42:03 2000
      --- src/normal.c Wed Apr 12 15:18:58 2000
      ***************
      *** 1868,1874 ****
      /* This is a new edit command, not a restart. We don't edit
      * recursively. */
      restart_edit = 0;
      ! op_insert(oap); /* handles insert & append; will call edit() */
      }
      #endif
      break;
      --- 1868,1875 ----
      /* This is a new edit command, not a restart. We don't edit
      * recursively. */
      restart_edit = 0;
      ! op_insert(oap, cap->count1);/* handles insert & append
      ! * will call edit() */
      }
      #endif
      break;
      *** ../vim-5.6.62/src/ops.c Wed Apr 12 19:01:02 2000
      --- src/ops.c Wed Apr 12 15:18:58 2000
      ***************
      *** 483,502 ****
      int count = 0; /* extra spaces to replace a cut TAB */
      int spaces = 0; /* non-zero if cutting a TAB */
      colnr_t offset; /* pointer along new line */
      ! int s_len; /* STRLEN(s) */
      char_u *newp, *oldp; /* new, old lines */
      linenr_t lnum; /* loop var */
      int oldstate = State;

      State = INSERT; /* don't want REPLACE for State */
      for (lnum = oap->start.lnum + 1; lnum <= oap->end.lnum; lnum++)
      {
      block_prep(oap, bdp, lnum, TRUE);
      if (bdp->is_short && b_insert)
      continue; /* OP_INSERT, line ends before block start */

      - s_len = STRLEN(s);
      -
      oldp = ml_get(lnum);

      if (b_insert)
      --- 483,502 ----
      int count = 0; /* extra spaces to replace a cut TAB */
      int spaces = 0; /* non-zero if cutting a TAB */
      colnr_t offset; /* pointer along new line */
      ! unsigned s_len; /* STRLEN(s) */
      char_u *newp, *oldp; /* new, old lines */
      linenr_t lnum; /* loop var */
      int oldstate = State;

      State = INSERT; /* don't want REPLACE for State */
      + s_len = STRLEN(s);
      +
      for (lnum = oap->start.lnum + 1; lnum <= oap->end.lnum; lnum++)
      {
      block_prep(oap, bdp, lnum, TRUE);
      if (bdp->is_short && b_insert)
      continue; /* OP_INSERT, line ends before block start */

      oldp = ml_get(lnum);

      if (b_insert)
      ***************
      *** 1820,1827 ****
      * op_insert - Insert and append operators for Visual mode.
      */
      void
      ! op_insert(oap)
      OPARG *oap;
      {
      long ins_len, pre_textlen = 0;
      char_u *firstline, *ins_text;
      --- 1820,1828 ----
      * op_insert - Insert and append operators for Visual mode.
      */
      void
      ! op_insert(oap, count1)
      OPARG *oap;
      + long count1;
      {
      long ins_len, pre_textlen = 0;
      char_u *firstline, *ins_text;
      ***************
      *** 1867,1873 ****
      inc_cursor();
      }

      ! edit(NUL, FALSE, (linenr_t)1);

      /* if user has moved off this line, we don't know what to do, so do
      * nothing */
      --- 1868,1874 ----
      inc_cursor();
      }

      ! edit(NUL, FALSE, (linenr_t)count1);

      /* if user has moved off this line, we don't know what to do, so do
      * nothing */
      *** ../vim-5.6.62/src/proto/ops.pro Sun Apr 2 11:57:11 2000
      --- src/proto/ops.pro Wed Apr 12 16:40:01 2000
      ***************
      *** 18,24 ****
      int op_replace __ARGS((OPARG *oap, int c));
      void op_tilde __ARGS((OPARG *oap));
      void swapchar __ARGS((int op_type, FPOS *pos));
      ! void op_insert __ARGS((OPARG *oap));
      int op_change __ARGS((OPARG *oap));
      void init_yank __ARGS((void));
      int op_yank __ARGS((OPARG *oap, int deleting, int mess));
      --- 18,24 ----
      int op_replace __ARGS((OPARG *oap, int c));
      void op_tilde __ARGS((OPARG *oap));
      void swapchar __ARGS((int op_type, FPOS *pos));
      ! void op_insert __ARGS((OPARG *oap, long count1));
      int op_change __ARGS((OPARG *oap));
      void init_yank __ARGS((void));
      int op_yank __ARGS((OPARG *oap, int deleting, int mess));
      *** ../vim-5.6.62/src/version.c Wed Apr 12 19:01:02 2000
      --- src/version.c Wed Apr 12 19:02:00 2000
      ***************
      *** 420,421 ****
      --- 420,423 ----
      { /* Add new patch number below this line */
      + /**/
      + 63,
      /**/

      --
      hundred-and-one symptoms of being an internet addict:
      11. You find yourself typing "com" after every period when using a word
      processor.com

      /-/-- Bram Moolenaar --- Bram@... --- http://www.moolenaar.net --\-\
      \-\-- Vim: http://www.vim.org ---- ICCF Holland: http://www.vim.org/iccf --/-/
    Your message has been successfully submitted and would be delivered to recipients shortly.