mirror of
https://github.com/Hopiu/micro.git
synced 2026-04-19 05:41:01 +00:00
Fix autocomplete on empty prompt
This commit is contained in:
parent
3f01101da4
commit
7e3aa337f6
1 changed files with 1 additions and 1 deletions
|
|
@ -323,7 +323,7 @@ func (m *Messenger) Prompt(prompt, placeholder, historyType string, completionTy
|
|||
chosen = chosen + CommonSubstring(suggestions...)
|
||||
}
|
||||
|
||||
if len(suggestions) != 0 {
|
||||
if len(suggestions) != 0 && chosen != "" {
|
||||
m.response = shellwords.Join(append(args[:len(args)-1], chosen)...)
|
||||
m.cursorx = Count(m.response)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue