mirror of
https://github.com/bloeys/nterm.git
synced 2025-12-29 14:38:19 +00:00
Make bg colors work with spaces
This commit is contained in:
@ -319,10 +319,7 @@ func (gr *GlyphRend) ScreenPosToGridPos(x, y float32) (gridX, gridY float32) {
|
|||||||
func (gr *GlyphRend) drawRune(run *TextRun, i int, prevRune rune, pos *gglm.Vec3, color *gglm.Vec4, lineHeightF32 float32, bufIndex *uint32) {
|
func (gr *GlyphRend) drawRune(run *TextRun, i int, prevRune rune, pos *gglm.Vec3, color *gglm.Vec4, lineHeightF32 float32, bufIndex *uint32) {
|
||||||
|
|
||||||
r := run.Runes[i]
|
r := run.Runes[i]
|
||||||
if r == ' ' {
|
if r == '\t' {
|
||||||
pos.AddX(gr.Atlas.SpaceAdvance)
|
|
||||||
return
|
|
||||||
} else if r == '\t' {
|
|
||||||
pos.AddX(gr.Atlas.SpaceAdvance * float32(gr.SpacesPerTab))
|
pos.AddX(gr.Atlas.SpaceAdvance * float32(gr.SpacesPerTab))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user