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

loss of curswant when motion key mapped in 'n' or 'v' #1

Closed
christfo opened this issue Nov 9, 2011 · 6 comments
Closed

loss of curswant when motion key mapped in 'n' or 'v' #1

christfo opened this issue Nov 9, 2011 · 6 comments
Assignees
Labels

Comments

@christfo
Copy link

christfo commented Nov 9, 2011

this might be unfair to pin on arpeggio, but I can't find a workaround. The issue is as follows:

say I start vim with no chords loaded and I have three lines:

:set ignorecase

:set smartcase

If in normal mode I position my cursor on the 'o' of ignore and execute ":echo winsaveview()", then I move down with 'j' and do the same, and again onto the smartcase line, I get:

{'lnum': 25, 'leftcol': 0, 'col': 8, 'topfill': 0, 'topline': 1, 'coladd': 0, 'skipcol': 0, 'curswant': 8}
{'lnum': 26, 'leftcol': 0, 'col': 0, 'topfill': 0, 'topline': 1, 'coladd': 0, 'skipcol': 0, 'curswant': 8}
{'lnum': 27, 'leftcol': 0, 'col': 8, 'topfill': 0, 'topline': 1, 'coladd': 0, 'skipcol': 0, 'curswant': 8}

and the cursor sits on the 'r' of smart.

next I execute
:call arpeggio#map('nv', 's', 0, 'jk', '<Esc>')
and repeat the exercise.

{'lnum': 25, 'leftcol': 0, 'col': 8, 'topfill': 0, 'topline': 1, 'coladd': 0, 'skipcol': 0, 'curswant': 8}
{'lnum': 26, 'leftcol': 0, 'col': 0, 'topfill': 0, 'topline': 1, 'coladd': 0, 'skipcol': 0, 'curswant': 0}
{'lnum': 27, 'leftcol': 0, 'col': 0, 'topfill': 0, 'topline': 1, 'coladd': 0, 'skipcol': 0, 'curswant': 0}

...and this time the cursor sits on the ':' .
I'm looking for the mapping to preserve the 'curswant' presumably, but this is already outside my vimfoo to work out what is going awry.

incidentally, the cursor keys still behave so I tried
:nnoremap <Plug>(arpeggio-default:j) <down>
but no luck.

And finally, thanks for such an awesome plugin. Its a huge boost to productivity.

@kana
Copy link
Owner

kana commented Nov 9, 2011

Thank you for the feedback.
I know the problem a few years ago, but I couldn't figure out the cause of the problem.
I'll re-investigate the problem later. It may take several days.

@kana
Copy link
Owner

kana commented Nov 11, 2011

I've investigated the problem a bit. It seems to be a problematic behavior of Vim itself. Setting 'timeoutlen' or 'ttimeoutlen' in some context affects curswant unexpectedly. I'll dig it more.

@kana
Copy link
Owner

kana commented Nov 11, 2011

I've asked vim_dev about the problem because it seems to be a bug in Vim.
See the following thread http://groups.google.com/group/vim_dev/t/ac0afa318baba3ef if you have an interest on the problem.
I'll make a patch to solve the problem later.

@ghost ghost assigned kana Nov 12, 2011
@christfo
Copy link
Author

Thanks so much! looks like the problem went way deeper than I imagined.
thank you!

@kana
Copy link
Owner

kana commented Mar 29, 2012

Now the problem is solved officially. Try Vim 7.3.487 or later.

@christfo
Copy link
Author

again, thanks for your dedication on this one. Still one of my favourite plugins.

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

No branches or pull requests

2 participants