Compare commits
2 commits
Author | SHA1 | Date | |
---|---|---|---|
|
3d845eefe3 | ||
|
d8576d0fe6 |
1 changed files with 13 additions and 0 deletions
|
@ -2,6 +2,7 @@ package display
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"strconv"
|
"strconv"
|
||||||
|
"unicode"
|
||||||
|
|
||||||
runewidth "github.com/mattn/go-runewidth"
|
runewidth "github.com/mattn/go-runewidth"
|
||||||
"github.com/zyedidia/micro/v2/internal/buffer"
|
"github.com/zyedidia/micro/v2/internal/buffer"
|
||||||
|
@ -624,6 +625,11 @@ func (w *BufWindow) displayBuffer() {
|
||||||
width = util.Min(ts, maxWidth-vloc.X)
|
width = util.Min(ts, maxWidth-vloc.X)
|
||||||
totalwidth += ts
|
totalwidth += ts
|
||||||
default:
|
default:
|
||||||
|
if unicode.IsUpper(r) {
|
||||||
|
width = 2
|
||||||
|
totalwidth += 2
|
||||||
|
break
|
||||||
|
}
|
||||||
width = runewidth.RuneWidth(r)
|
width = runewidth.RuneWidth(r)
|
||||||
totalwidth += width
|
totalwidth += width
|
||||||
}
|
}
|
||||||
|
@ -658,6 +664,13 @@ func (w *BufWindow) displayBuffer() {
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, r := range word {
|
for _, r := range word {
|
||||||
|
if unicode.IsUpper(r.r) {
|
||||||
|
draw('~', nil, r.style, true, true)
|
||||||
|
draw(r.r, r.combc, r.style, true, false)
|
||||||
|
bloc.X++
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
draw(r.r, r.combc, r.style, true, true)
|
draw(r.r, r.combc, r.style, true, true)
|
||||||
|
|
||||||
// Draw any extra characters either spaces for tabs or @ for incomplete wide runes
|
// Draw any extra characters either spaces for tabs or @ for incomplete wide runes
|
||||||
|
|
Loading…
Reference in a new issue