Repository navigation
Fix tab completion appending quote - #782
Merged
Merged
Conversation
st0012
reviewed
Nov 25, 2024
|
|
||
| def retrieve_completion_block(set_completion_quote_character = false) | ||
| @line_editor.retrieve_completion_block(set_completion_quote_character) | ||
| def retrieve_completion_block(_unused = false) |
Member
Author
There was a problem hiding this comment.
I left the parameter because this is exposed to DialogProcScope like this.
# This is possible
Reline.add_dialog_proc(:dialogname, ->{
p retrieve_completion_block(true)
nil
})But code searching in github, it looks like this method is not used yet. I think we can remove the parameter.
I didn't confirm yet, but this method itself might be useful to use from IRB to reduce this hack
https://github.com/ruby/irb/blob/84366b8cdd7ac4c200a03405a07ed074aff5ae23/lib/irb/input-method.rb#L302-L305
Hack that stores @completion_params in completion_proc and read it from dialog_proc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #444
When complecion candidates are
%w[foo bar baz]x = "f█x = "f"█x = "foo"█x = 'f█x = 'f'█x = 'foo'█x = "b█x = "b"█x = "ba█["a", "f█["a", "f"█["a", "foo"█["a"b", "f█["a"b", "f█["a"b", "foo█["a"b", "foo"█["a\"b", "f█["a\"b", "f"█["a\"b", "foo"█x = "f█ bar bazx = "f"█ bar bazx = "foo█ bar baz