We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
There is a specific case when you delete the first character in select mode, library panics out:
`> panic: runtime error: integer divide by zero [signal 0x8 code=0x7 addr=0x5958e pc=0x5958e]
goroutine 6 [running]: panic(0x1306a0, 0xc82000a0b0) /usr/local/Cellar/go/1.6.2/libexec/src/runtime/panic.go:481 +0x3e6 gopkg.in/readline%2ev1.(_opCompleter).doSelect(0xc820084080) /go/src/gopkg.in/readline.v1/complete.go:49 +0xee gopkg.in/readline%2ev1.(_opCompleter).OnComplete(0xc820084080) /go/src/gopkg.in/readline.v1/complete.go:72 +0x1e6 gopkg.in/readline%2ev1.(*Operation).ioloop(0xc820060300) /go/src/gopkg.in/readline.v1/operation.go:172 +0x1439 created by gopkg.in/readline%2ev1.NewOperation /go/src/gopkg.in/readline.v1/operation.go:67 +0x42a`
Here is a gist of what I'm using to test this: https://gist.github.com/antekresic/283106411e826f53799fa4565e90f094
Steps to reproduce: press 's', Tab, Tab, Backspace
Issue seems to be caused by entering OnComplete for an empty input rune buffer. My fix suggestion is to add a check for the empty buffer here: https://github.com/chzyer/readline/blob/master/complete.go#L69
Let me know if you want a PR.
Thanks!
The text was updated successfully, but these errors were encountered:
Nice catch, Thanks! And PR is welcome :)
Sorry, something went wrong.
[completer] Fixes issue chzyer#53
83a3f74
[completer] Fix bug which causes integer divide by zero panicking whe…
dc15d0f
…n input buffer is empty (#54) * [completer] Fixes issue #53 * Changing check to candidateSource
f07e46d
…n input buffer is empty (chzyer#54) * [completer] Fixes issue chzyer#53 * Changing check to candidateSource
No branches or pull requests
There is a specific case when you delete the first character in select mode, library panics out:
`> panic: runtime error: integer divide by zero
[signal 0x8 code=0x7 addr=0x5958e pc=0x5958e]
goroutine 6 [running]:
panic(0x1306a0, 0xc82000a0b0)
/usr/local/Cellar/go/1.6.2/libexec/src/runtime/panic.go:481 +0x3e6
gopkg.in/readline%2ev1.(_opCompleter).doSelect(0xc820084080)
/go/src/gopkg.in/readline.v1/complete.go:49 +0xee
gopkg.in/readline%2ev1.(_opCompleter).OnComplete(0xc820084080)
/go/src/gopkg.in/readline.v1/complete.go:72 +0x1e6
gopkg.in/readline%2ev1.(*Operation).ioloop(0xc820060300)
/go/src/gopkg.in/readline.v1/operation.go:172 +0x1439
created by gopkg.in/readline%2ev1.NewOperation
/go/src/gopkg.in/readline.v1/operation.go:67 +0x42a`
Here is a gist of what I'm using to test this:
https://gist.github.com/antekresic/283106411e826f53799fa4565e90f094
Steps to reproduce: press 's', Tab, Tab, Backspace
Issue seems to be caused by entering OnComplete for an empty input rune buffer. My fix suggestion is to add a check for the empty buffer here:
https://github.com/chzyer/readline/blob/master/complete.go#L69
Let me know if you want a PR.
Thanks!
The text was updated successfully, but these errors were encountered: