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

Don't freeze Atom editor with big-count-motion #596

Merged
merged 8 commits into from
Dec 13, 2016

Conversation

t9md
Copy link
Owner

@t9md t9md commented Dec 13, 2016

This was long lived bug.

  • Also happens in original vim-mode 1111111111111111111111111j throw exception in vim-mode.

Fix #560

Points to consider

  • Use of Base::countTimes and its' derivatives.
  • Big count was given to Motion
  • Big count was given to TextObject
    • Count support for textObject is very immature state though(v999999999ip freezes).
  • Count insertion e.g. 1 0 i then type abc then escape.
    • Found pure vim(checked by MacVim(vim8) in GUI) also freeze in this scenario.
    • Giving a big count freezes editor.
    • Applied to all child classes which have @supportInsertionCount set true.

[TODO]

  • Eliminate use of @countTimes from Motion.
  • Fix text-object
    • Fixed very imperatively, dirtily
      • Count specified in multi-selections and one of its fail stops other selection expand.
      • But I think it's far better than freezing editor.
    • No spec was added(I don't want to spend my time for this now, since count support of text-object is not well supported/defined yet).
  • Fix operator-insert.coffee
    • 💣 Limit max insertion count to 100 to avoid accidental 5555555555555i freezes editor.

@t9md
Copy link
Owner Author

t9md commented Dec 13, 2016

🎉🎉🎉🎉🎉🎉🎉

DONE, NO more freeze( I hope )!!!

🎉🎉🎉🎉🎉🎉🎉

@t9md t9md merged commit a05a9a0 into master Dec 13, 2016
@t9md t9md deleted the dont-freeze-motion-with-big-count branch March 10, 2017 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant