On Feb 14, 10:48 am, Андрей Радев <andrey.ra...@gmail.com> wrote:
> Hello,
>
> I've encountered some odd behaviour with Vim. I have a file containing
> the following text:
>
>     one = {
>       two: {
>         three: four;
>       }
>     }
>     // Some text here;
>
> I do the following:
>
>   1. Go to the first "t" in "three: four;", mark the line in
>      character-wise visual mode (with "v$") and then yank it.
>   2. Press "Va{" to mark the curly brackets.
>   3. Paste
>
> The result looks like this:
>
>     one = {
>       two: three: four;
>     }
>     // Some text here;
>
> However, if the "Some text" line is not present, so that the "}" is on
> the last line of the file, the result is this:
>
>     one = {
>       two: three: four;}
>
> If I perform an undo with "u", it turns into this:
>
>     one = {
>       two: {
>         three: four;
>       }
>       two: }
>
> The file is marked as unmodified, and quitting Vim leaves it exactly
> as if the undo worked correctly. However, saving the file results in
> this text being saved to disk.
>
> My first guess was a plugin that's messing with the undo behaviour,
> but this happens even with no "~/.vim" and a ".vimrc" that only
> contains "set nocompatible". The output of my Vim's "--version" is in
> this gist:https://gist.github.com/0ff1914f878e625bf4e5. Please let me
> know if you need anything else.
>

Confirmed with 7.3.434 Huge on Windows XP (Vim without Cream) with my
normal config. There seems to be no way to get to the original text
state using u/<C-R> or even :earlier and :later.

Also confirmed with gvim -N -u NONE -i NONE on the same system.
Again, :earlier cannot recover the original text.

-- 
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

Reply via email to