fix wordbreak to add number

This commit is contained in:
chzyer 2016-03-25 17:07:55 +08:00
parent 4e554e2dd0
commit bb5b4af6e7
1 changed files with 7 additions and 6 deletions

View File

@ -137,13 +137,14 @@ func LineCount(screenWidth, w int) int {
} }
func IsWordBreak(i rune) bool { func IsWordBreak(i rune) bool {
if i >= 'a' && i <= 'z' { switch {
return false case i >= 'a' && i <= 'z':
case i >= 'A' && i <= 'Z':
case i >= '0' && i <= '9':
default:
return true
} }
if i >= 'A' && i <= 'Z' { return false
return false
}
return true
} }
func GetInt(s []string, def int) int { func GetInt(s []string, def int) int {