mirror of
https://github.com/zyedidia/micro.git
synced 2024-09-17 15:07:41 +03: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:
parent
c2c2b2addf
commit
ee6519f5cb
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user