mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-29 14:22:42 +09:00
Improve tab completion in command mode
Pressing tab when all suggestions start with the same substring will insert that substring (this is how bash autocompletion works).
This commit is contained in:
@@ -49,6 +49,10 @@ func FileComplete(input string) (string, []string) {
|
||||
} else {
|
||||
chosen = suggestions[0]
|
||||
}
|
||||
} else {
|
||||
if len(dirs) > 1 {
|
||||
chosen = strings.Join(dirs[:len(dirs)-1], "/") + "/"
|
||||
}
|
||||
}
|
||||
|
||||
return chosen, suggestions
|
||||
|
||||
Reference in New Issue
Block a user