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

Auto suggestion error when type "\\" character #602

Closed
toanvan opened this issue Nov 17, 2020 · 0 comments
Closed

Auto suggestion error when type "\\" character #602

toanvan opened this issue Nov 17, 2020 · 0 comments
Labels
Milestone

Comments

@toanvan
Copy link

toanvan commented Nov 17, 2020

I found a bug the same with issue #570 but with \\ characters and when insert \\ to command.
For example:

  1. The first case:
    $ \\
    (logout and show error)
    =>log file
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        at java.lang.String.substring(String.java:1931) ~[na:1.8.0_261]
        at org.jline.reader.impl.LineReaderImpl.matchPreviousCommand(LineReaderImpl.java:3985) ~[jline-3.17.1.jar:na]
        at org.jline.reader.impl.LineReaderImpl.getDisplayedBufferWithPrompts(LineReaderImpl.java:4011) ~[jline-3.17.1.jar:na]
  1. The second case:
    $appendcommand \l
    Insert slash to above command
    $appendcommand \\l
    (logout and show error)
    =>log file
java.util.regex.PatternSyntaxException: Illegal/unsupported escape sequence near index 17
appendcluster \\\l.*
                 ^
        at java.util.regex.Pattern.error(Pattern.java:1969) ~[na:1.8.0_261]
        at java.util.regex.Pattern.escape(Pattern.java:2485) ~[na:1.8.0_261]
        at java.util.regex.Pattern.atom(Pattern.java:2212) ~[na:1.8.0_261]
        at java.util.regex.Pattern.sequence(Pattern.java:2144) ~[na:1.8.0_261]
        at java.util.regex.Pattern.expr(Pattern.java:2010) ~[na:1.8.0_261]
        at java.util.regex.Pattern.compile(Pattern.java:1702) ~[na:1.8.0_261]

Please help me check again

@mattirn mattirn added the bug label Nov 17, 2020
@mattirn mattirn added this to the 3.17.2 milestone Nov 17, 2020
@mattirn mattirn mentioned this issue Dec 11, 2020
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