diff options
| author | Mari Imaizumi <mariimaizumi5@gmail.com> | 2024-04-19 21:08:18 +0900 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2024-04-19 12:08:22 +0000 |
| commit | 604c29e8a2e78ea5d6c0e76385000ed6cde78aca (patch) | |
| tree | a5a2a946b3c136414e2657380279881abbc2ed86 /lib | |
| parent | 4218e6bbd50f2e5bc1fd39d8e504c0d7ef96dc15 (diff) | |
[ruby/reline] Implement `show-all-if-ambiguous` feature
(https://github.com/ruby/reline/pull/683)
https://github.com/ruby/reline/commit/0fe4fdc794
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/reline/line_editor.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index b2a963c6ab..c4ae651556 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -880,10 +880,12 @@ class Reline::LineEditor @completion_state = CompletionState::PERFECT_MATCH else @completion_state = CompletionState::MENU_WITH_PERFECT_MATCH + complete(list, true) if @config.show_all_if_ambiguous end @perfect_matched = completed else @completion_state = CompletionState::MENU + complete(list, true) if @config.show_all_if_ambiguous end if not just_show_list and target < completed @buffer_of_lines[@line_index] = (preposing + completed + completion_append_character.to_s + postposing).split("\n")[@line_index] || String.new(encoding: @encoding) |
