Fix some issues with unicode handling

There were unicode issues with prompts, search, and syntax highlighting,
which are now fixed.
This commit is contained in:
Zachary Yedidia
2016-08-18 08:14:33 -07:00
parent e4b6a931de
commit 8d230d2038
4 changed files with 7 additions and 5 deletions

View File

@@ -624,7 +624,8 @@ func (v *View) DisplayView() {
}
// Now we actually draw the line
for colN, ch := range line {
colN := 0
for _, ch := range line {
lineStyle := defStyle
if settings["syntax"].(bool) {
@@ -709,6 +710,7 @@ func (v *View) DisplayView() {
}
charNum = charNum.Move(1, v.Buf)
screenX++
colN++
}
// Here we are at a newline