Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cursor jumps to the end of closed fold when executing a register #121

Open
GoogleCodeExporter opened this issue Aug 18, 2015 · 0 comments
Open

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

The following code shows how to reproduce this issue. I use netrw help file as 
an example because it's a large file with many folds.

"-----BEGIN-----------------------------
edit $VIMRUNTIME/doc/pi_netrw.txt
set fdm=marker fdl=0
" Position cursor on the first line of the first closed fold.
normal! ggzj
let @z = "echo line('.')"
echo line('.')
@z
echo line('.')
"-----END-------------------------------


What is the expected output? What do you see instead?

The cursor position should not change.
Insted, it jumps to the last line in the closed fold.


What version of the product are you using? On what operating system?

Vim 7.3.829 from Cream project, Windows XP.


Please provide any additional information below.

This is an issue with execution of registers (:help :@) and folding. When the 
cursor is on a closed fold and a register is executed, the cursor always jumps 
to the last line in the fold.

If an address is provided before the register and is anywhere in a closed fold 
(e.g., :28@z in the example above), the cursor also jumps to the last line in 
the fold.



Original issue reported on code.google.com by vlad.ir...@gmail.com on 12 Mar 2013 at 1:06

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant