mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-16 13:57:07 +09:00
Autocomplete unknown value in set filetype ...
`unknown` is a valid value for the `filetype` option (and executing `set filetype unknown` does what is expected: it forces filetype autodetection). So let's add `unknown` to the autocomplete suggestions for `filetype`, along with actual filetypes.
This commit is contained in:
@@ -87,6 +87,10 @@ func filetypeComplete(input string) (string, []string) {
|
||||
}
|
||||
}
|
||||
|
||||
if strings.HasPrefix("unknown", input) {
|
||||
suggestions = append(suggestions, "unknown")
|
||||
}
|
||||
|
||||
var chosen string
|
||||
if len(suggestions) == 1 {
|
||||
chosen = suggestions[0]
|
||||
|
||||
Reference in New Issue
Block a user