mirror of
https://github.com/qvacua/vimr.git
synced 2024-11-28 11:35:35 +03:00
Draw underline
This commit is contained in:
parent
246638ff96
commit
f34624c1f5
@ -89,6 +89,18 @@ final class AttributesRunDrawer {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if run.attrs.fontTrait.contains(.underline) {
|
||||||
|
guard let lastPosition = fontGlyphRuns.last?.positions.last?.x else {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
let x1 = lastPosition + self.cellSize.width
|
||||||
|
let x0 = fontGlyphRuns[0].positions[0].x
|
||||||
|
let y0 = fontGlyphRuns[0].positions[0].y
|
||||||
|
CGRect(x: x0, y: y0 + self.underlinePosition,
|
||||||
|
width: x1, height: self.underlineThickness).fill()
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: GH-666: Draw underline/curl
|
// TODO: GH-666: Draw underline/curl
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user