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

# in Normal mode causes Vim to lock up #569

Closed
Liquidmantis opened this issue Aug 5, 2016 · 9 comments · Fixed by #702
Closed

# in Normal mode causes Vim to lock up #569

Liquidmantis opened this issue Aug 5, 2016 · 9 comments · Fixed by #702

Comments

@Liquidmantis
Copy link

What did you do?

Accidentally pressed # while in Normal mode rather than Inser.

Put the exact key strokes you pressed to reproduce the issue, if possible.

What did you expect to happen?

Nothing

What happened instead?

Vim stops working. Requires restart of VS Code.

Technical details:

  • VSCode Version:
    Stable 1.4.0
    Insiders 1.5.0

  • VsCodeVim Version:
    0.1.4 (this doesn't occur in 0.1.3)

    [please ensure you are on the latest]

  • OS:
    Win2012 R2
    OS X 10.11.6

@johnfn
Copy link
Member

johnfn commented Aug 5, 2016

Wow, that is pretty bad. Thanks for the report, @Liquidmantis. We'll get to it quickly.

@jpoon
Copy link
Member

jpoon commented Aug 5, 2016

After pressing #, we get an infinite loop here:

@johnfn
Copy link
Member

johnfn commented Aug 5, 2016

Looks right to me. We should just quit the loop if the cursor stays in the
same place after an iteration.

On Fri, Aug 5, 2016 at 11:13 PM, Jason Poon [email protected]
wrote:

Initial investigation looks like this is an infinite loop:


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#569 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAKPQZvuubggJBCU7pTJAQ5Jm86NTSpUks5qc8OvgaJpZM4Jdt4I
.

Grant

@johnfn
Copy link
Member

johnfn commented Aug 5, 2016

(Same thing also necessary for *)

On Fri, Aug 5, 2016 at 11:15 PM, Grant Mathews [email protected] wrote:

Looks right to me. We should just quit the loop if the cursor stays in the
same place after an iteration.

On Fri, Aug 5, 2016 at 11:13 PM, Jason Poon [email protected]
wrote:

Initial investigation looks like this is an infinite loop:


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#569 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAKPQZvuubggJBCU7pTJAQ5Jm86NTSpUks5qc8OvgaJpZM4Jdt4I
.

Grant

Grant

@jpoon
Copy link
Member

jpoon commented Aug 5, 2016

We should probably include logic here to check if the wordatposition is whitespace. if so, spit out e348: string under cursor.

@jpoon
Copy link
Member

jpoon commented Aug 5, 2016

Actually, what @johnfn suggested is probably easiest :)

@johnfn
Copy link
Member

johnfn commented Aug 6, 2016

Actually I think all you have to do is check to see if the single character
that the cursor is on is whitespace, so you may actually have the true
easiest solution. ;-)

On Fri, Aug 5, 2016 at 11:19 PM, Jason Poon [email protected]
wrote:

Actually, what @johnfn https://github.com/johnfn suggested is probably
easiest :)


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#569 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAKPQcQZdfZj3Fe9-u9ZfS_7Xhlh8TXDks5qc8TxgaJpZM4Jdt4I
.

Grant

@jpoon
Copy link
Member

jpoon commented Aug 6, 2016

Unfortunately, it is a little more involved.

The expected behaviour is:

  1. if current line is blank, do nothing
  2. otherwise, go to next alpha-numeric word right of the cursor. For instance,
  |   "package": omg

should search for word package and NOT "package". We have the same bug with star, although there's no infinite loop with "star", haven't had a chance to look into why.

VIM locking up is baaad so I think what a good course of action is to:

  1. do the simple whitespace check just to prevent the lock up then,
  2. work on the actual implementation to implement the proper behaviour for # and *

@jpoon
Copy link
Member

jpoon commented Aug 6, 2016

06c4906 adds a small hack to prevent the lock-up, but I'm closing this in favor of #429 to track the proper implementation of # and *.

Thanks for reporting the issue @Liquidmantis!

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

Successfully merging a pull request may close this issue.

3 participants