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

Modifying last command incorrectly autocompletes when using a subsequence #338

Closed
andystanton opened this Issue Feb 3, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@andystanton

andystanton commented Feb 3, 2016

System

  • OS: OSX 10.10.5
  • Ammonite REPL Version: 0.5.3
  • Terminal: OSX Terminal and iTerm2 beta 3.
  • Shell: zsh and bash

Steps to reproduce

  1. Load Ammonite REPL
  2. Type println("foo").
  3. Push return.
  4. foo is printed out as expected.
  5. Push up arrow to show last command.
  6. Use left arrow to place cursor after the last 'o'.
  7. Push backspace so the command now reads println("fo")
  8. Push return.
  9. Command changes to println("foo") and foo is printed out instead of fo.

This affects numbers as well e.g.

  1. Load Ammonite REPL
  2. Type println(100).
  3. Push return.
  4. 100 is printed out as expected.
  5. Push up arrow to show last command.
  6. Use left arrow to place cursor after the last '0'.
  7. Push backspace so the command now reads println(10)
  8. Push return.
  9. Command changes to println(100) and 100 is printed out instead of 10.

Notes

  • This issue specifically affects modifying previous statement as described in steps. Entering println("foo") followed by manually typing println("fo") works as expected.
  • This issue specifically affects subsequences of the string/number, so changing foo to bar or 100 to 200 will behave as expected.
@lihaoyi

This comment has been minimized.

Owner

lihaoyi commented Feb 3, 2016

looks like I forgot that BACKSPACE counts as a control character

@lihaoyi lihaoyi closed this in d166bd0 Feb 3, 2016

@andystanton

This comment has been minimized.

andystanton commented Feb 3, 2016

That was ridiculously quick. Many thanks for your great work @lihaoyi

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