mirror of
https://github.com/zyedidia/micro.git
synced 2024-11-09 08:26:38 +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
|
var chosen string
|
||||||
if len(suggestions) == 1 {
|
if len(suggestions) == 1 {
|
||||||
chosen = suggestions[0]
|
chosen = suggestions[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user