mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-30 06:37:14 +09:00
Improve comments
This commit is contained in:
@@ -25,7 +25,7 @@ var (
|
||||
|
||||
// Version is the version number or commit hash
|
||||
Version = "0.0.0-unknown"
|
||||
// Semantic version
|
||||
// SemVersion is the Semantic version
|
||||
SemVersion semver.Version
|
||||
// CommitHash is the commit this version was built on
|
||||
CommitHash = "Unknown"
|
||||
@@ -421,14 +421,17 @@ func Clamp(val, min, max int) int {
|
||||
return val
|
||||
}
|
||||
|
||||
// IsNonAlphaNumeric returns if the rune is not a number of letter or underscore.
|
||||
func IsNonAlphaNumeric(c rune) bool {
|
||||
return !unicode.IsLetter(c) && !unicode.IsNumber(c) && c != '_'
|
||||
}
|
||||
|
||||
// IsAutocomplete returns whether a character should begin an autocompletion.
|
||||
func IsAutocomplete(c rune) bool {
|
||||
return c == '.' || !IsNonAlphaNumeric(c)
|
||||
}
|
||||
|
||||
// ParseSpecial replaces escaped ts with '\t'.
|
||||
func ParseSpecial(s string) string {
|
||||
return strings.ReplaceAll(s, "\\t", "\t")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user