On Wed, Aug 10, 2016 at 4:08 AM, guraga <[email protected]> wrote: > > Prepare: > > git clone https://github.com/vim/vim > cd vim > > # Compile two versions of vim > > git checkout v7.4.319 > make > cp ./src/vim ../vim-7.4.319 > > git checkout v7.4.320 > make > cp ./src/vim ../vim-7.4.320 > > cd .. > > # Create test file > seq 3 > test_file.txt > > Content of "~/.vimrc": > > set nocompatible > > autocmd BufReadPost * > \ if > \ line( "'\"" ) > 1 > \ && > \ line( "'\"" ) <= line( '$' ) > \ | > \ execute 'normal! g`"' > \ | > \ endif > > Directories "~/.vim", "/usr/local/share/vim", "/usr/share/vim" does not > exists. > > Begin of test. > > # Remove file "~/.viminfo" > rm -f ~/.viminfo > > # Run vim > ../vim-7.4.319 > > Type ":tabnew test_file.txt" and press Enter. > Cursor will be in line 1. > Press "j" (or "Down arrow"), "ZQ", "ZQ". > Vim will store mark "double quote" in file "~/.viminfo" and exit. > > Run vim: > > ./vim-7.4.319 > > Vim will read file "~/.viminfo". > > Type ":tabnew test_file.txt" and press Enter. > > End of test. > > If you run executable "./vim-7.4.319", > after execute given steps > cursor will be at line 2 (as expected). > > If you run executable "./vim-7.4.320", > after execute given steps > cursor will be at line 1 (bug). > > Bug: since vim patch 7.4.320, > when using given steps (":tabnew" and "ZQ"), > mark "double quote" > not saved in file "~/.viminfo". > >
The ZQ command means "quit and don't save", just as ":q!". If I don't save the changes, I wouldn't be worried if the cursor position was lost too: maybe the earlier behaviour (saving the cursor position even when forgetting the changes) was the bug. I usually quit Vim by :wa|wv followed by :qa and in that case (and with the autocommand in the vimrc_example.vim) the cursor position is restored on restart, or whenever I reopen a file which is not too old for its history to be "remembered". Best regards, Tony. -- -- 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.
