mirror of
https://github.com/zyedidia/micro.git
synced 2026-04-02 16:09:49 +09:00
Compare commits
2 Commits
canute-til
...
canute
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3d845eefe3 | ||
|
|
d8576d0fe6 |
@@ -627,10 +627,11 @@ func (w *BufWindow) displayBuffer() {
|
||||
default:
|
||||
if unicode.IsUpper(r) {
|
||||
width = 2
|
||||
} else {
|
||||
width = runewidth.RuneWidth(r)
|
||||
totalwidth += width
|
||||
totalwidth += 2
|
||||
break
|
||||
}
|
||||
width = runewidth.RuneWidth(r)
|
||||
totalwidth += width
|
||||
}
|
||||
|
||||
word = append(word, glyph{r, combc, curStyle, width})
|
||||
@@ -666,19 +667,21 @@ func (w *BufWindow) displayBuffer() {
|
||||
if unicode.IsUpper(r.r) {
|
||||
draw('~', nil, r.style, true, true)
|
||||
draw(r.r, r.combc, r.style, true, false)
|
||||
} else {
|
||||
draw(r.r, r.combc, r.style, true, true)
|
||||
bloc.X++
|
||||
continue
|
||||
}
|
||||
|
||||
// Draw any extra characters either spaces for tabs or @ for incomplete wide runes
|
||||
if r.width > 1 {
|
||||
char := ' '
|
||||
if r.r != '\t' {
|
||||
char = '@'
|
||||
}
|
||||
draw(r.r, r.combc, r.style, true, true)
|
||||
|
||||
for i := 1; i < r.width; i++ {
|
||||
draw(char, nil, r.style, true, false)
|
||||
}
|
||||
// Draw any extra characters either spaces for tabs or @ for incomplete wide runes
|
||||
if r.width > 1 {
|
||||
char := ' '
|
||||
if r.r != '\t' {
|
||||
char = '@'
|
||||
}
|
||||
|
||||
for i := 1; i < r.width; i++ {
|
||||
draw(char, nil, r.style, true, false)
|
||||
}
|
||||
}
|
||||
bloc.X++
|
||||
|
||||
Reference in New Issue
Block a user