mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-16 05:47:06 +09:00
Fix autocomplete on empty prompt
This commit is contained in:
@@ -323,7 +323,7 @@ func (m *Messenger) Prompt(prompt, placeholder, historyType string, completionTy
|
|||||||
chosen = chosen + CommonSubstring(suggestions...)
|
chosen = chosen + CommonSubstring(suggestions...)
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(suggestions) != 0 {
|
if len(suggestions) != 0 && chosen != "" {
|
||||||
m.response = shellwords.Join(append(args[:len(args)-1], chosen)...)
|
m.response = shellwords.Join(append(args[:len(args)-1], chosen)...)
|
||||||
m.cursorx = Count(m.response)
|
m.cursorx = Count(m.response)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user