Only start autocompletion for alphanumerics

Ref #1712
This commit is contained in:
Zachary Yedidia
2020-06-08 13:54:31 -04:00
parent ead07e0b60
commit 79ee757757
2 changed files with 10 additions and 1 deletions

View File

@@ -418,6 +418,10 @@ func IsNonAlphaNumeric(c rune) bool {
return !unicode.IsLetter(c) && !unicode.IsNumber(c) && c != '_'
}
func IsAutocomplete(c rune) bool {
return c == '.' || !IsNonAlphaNumeric(c)
}
func ParseSpecial(s string) string {
return strings.Replace(s, "\\t", "\t", -1)
}