Skip to content
New issue

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

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

Already on GitHub? # to your account

Input a non-matched character then cancel loses cursor position #48

Closed
novadev94 opened this issue Aug 21, 2016 · 2 comments
Closed

Input a non-matched character then cancel loses cursor position #48

novadev94 opened this issue Aug 21, 2016 · 2 comments

Comments

@novadev94
Copy link

Hi,

It looks like the cursor position is loss after trying to jump to a non-matched character and then cancel (by pressing Escape or entering random letter). This works fine with any matched character, just the non-matched ones don't work, this behavior is a little bit annoying.

System Configuration

Sublime Text: Version 3 dev build 3119
Ace Jump: Version 1.5.0 (installed with package control)
Vintage/Vintageous: No

To Reproduce

  1. Having a text of something like "Hello World".
  2. Put the cursor somewhere in the text.
  3. Hit key combination for Character jump (other modes don't work too).
  4. Enter v (non-matched character). No match is found, no highlight is shown.
  5. Press Esc or any character.
  6. Cursor doesn't go back to its original position.
@kypi
Copy link

kypi commented Sep 10, 2016

Under add_labels(), commenting out "clear_views_sel(self.all_views)" fixes this. Not sure if this introduces other bugs, though.

@ice9js
Copy link
Owner

ice9js commented Sep 12, 2016

This makes sense as all of your current selections and cursors are removed so they don't interfere when the labels are shown, but they are never restored.
So a solution might be to store the current cursor positions before they're removed, so they can be restored after the jump for all views but the one that was selected.

If there's no one willing to try and fix it themselves, I'll try to find some time for this this week, as I have to admit this issue can be quite annoying sometimes.

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

No branches or pull requests

3 participants