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

Re: Patch 7.3.1200

Expand Messages
  • h_east
    Hi Bram, ... This patch works fine on new buffer or existing file(one line) editing. However, This patch seems incomplete when existing file(two or more lines)
    Message 1 of 2 , Jun 24, 2013
    • 0 Attachment
      Hi Bram,

      2013/6/16(Sun) 00:55:06 UTC+9 Bram Moolenaar:
      > Patch 7.3.1200
      >
      > Problem: When calling setline() from Insert mode, using CTRL-R =, undo does
      >
      > not work properly. (Israel Chauca)
      >
      > Solution: Sync undo after evaluating the expression. (Christian Brabandt)
      >
      > Files: src/edit.c, src/testdir/test61.in, src/testdir/test61.ok

      This patch works fine on new buffer or existing file(one line) editing.
      However, This patch seems incomplete when existing file(two or more lines) editing.

      How to reproduce.

      1.
      $ echo -e "\n" > foo
      $ od -t x1c foo
      0000000 0a 0a
      \n \n
      0000002
      $ vim -N -u NONE --noplugin foo

      2. input below.
      ia<Esc>o1<Esc>a2<C-R>=setline('.','1234')<CR><CR><Esc>

      3. Contents of the buffer
      --------
      a
      120
      34

      --------

      4. undo (first time)
      --------
      a
      12
      34

      --------

      5. undo (second time)
      --------
      a
      1 <=== ?
      34

      --------

      6. undo (third time)
      --------
      a
      34 <--- ??

      --------



      Best regards,
      Hirohito Higashi

      --
      --
      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 vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    Your message has been successfully submitted and would be delivered to recipients shortly.