mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-16 13:34:48 +02:00
Fix infinite recursion in readline completer
This commit is contained in:
@@ -113,7 +113,7 @@ func (self *Readline) complete(forwards bool, repeat_count uint) bool {
|
||||
self.input_state.lines[self.input_state.cursor.Y] += al[0]
|
||||
self.input_state.lines = append(self.input_state.lines, al[1:]...)
|
||||
}
|
||||
if c.current.num_of_matches == 1 && self.AllText() == all_text_before_completion {
|
||||
if c.current.num_of_matches == 1 && self.AllText() == all_text_before_completion && repeat_count > 0 {
|
||||
// when there is only a single match and it has already been inserted there is no point iterating over current completions
|
||||
orig := self.last_action
|
||||
self.last_action = ActionNil
|
||||
|
||||
Reference in New Issue
Block a user