Skip to content
Myr

Fix rendering of double-column borders on light renderer

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent 8b299a2 · Browse files · 1 file+4 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−2 removed

  • other:+4 added−2 removed

1 file+4 added−2 removed

modified:src/tui/light.go+4 added-2 removed
787 unmodified lines
788 hw := runewidth.RuneWidth(w.border.horizontal)789 vw := runewidth.RuneWidth(w.border.vertical)790 tcw := runewidth.RuneWidth(w.border.topLeft) + runewidth.RuneWidth(w.border.topRight)791 bcw := runewidth.RuneWidth(w.border.bottomLeft) + runewidth.RuneWidth(w.border.bottomRight)792 rem := (w.width - tcw) % hw792 w.CPrint(color, string(w.border.topLeft)+repeat(w.border.horizontal, (w.width-tcw)/hw)+string(w.border.topRight))793 w.CPrint(color, string(w.border.topLeft)+repeat(w.border.horizontal, (w.width-tcw)/hw)+repeat(' ', rem)+string(w.border.topRight))794 for y := 1; y < w.height-1; y++ {795 w.Move(y, 0)796 w.CPrint(color, string(w.border.vertical))797 w.CPrint(color, repeat(' ', w.width-vw*2))798 w.CPrint(color, string(w.border.vertical))799 }800 w.Move(w.height-1, 0)801 rem = (w.width - bcw) % hw800 w.CPrint(color, string(w.border.bottomLeft)+repeat(w.border.horizontal, (w.width-bcw)/hw)+string(w.border.bottomRight))802 w.CPrint(color, string(w.border.bottomLeft)+repeat(w.border.horizontal, (w.width-bcw)/hw)+repeat(' ', rem)+string(w.border.bottomRight))803}804805func (w *LightWindow) csi(code string) {806 w.renderer.csi(code)
240 unmodified lines