From f3f14193c211eb2a1068684b7f709cfb5806446e Mon Sep 17 00:00:00 2001 From: Zachary Yedidia Date: Thu, 9 Jun 2016 13:36:16 -0400 Subject: [PATCH] Fix autocompletion using a slash --- cmd/micro/messenger.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/micro/messenger.go b/cmd/micro/messenger.go index 50100c40..620c27bd 100644 --- a/cmd/micro/messenger.go +++ b/cmd/micro/messenger.go @@ -186,7 +186,11 @@ func (m *Messenger) Prompt(prompt, historyType string, completionType Completion } } if len(suggestions) == 1 { - m.response = strings.Join(dirs[:len(dirs)-1], "/") + "/" + suggestions[0] + if len(dirs) > 1 { + m.response = strings.Join(dirs[:len(dirs)-1], "/") + "/" + suggestions[0] + } else { + m.response = suggestions[0] + } m.cursorx = Count(m.response) } }