aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ui
diff options
context:
space:
mode:
authorTim Culverhouse <tim@timculverhouse.com>2024-02-12 06:26:21 -0600
committerRobin Jarry <robin@jarry.cc>2024-02-12 13:48:51 +0100
commit345962e33ccbd18fd672f63684d8248e1211a656 (patch)
treee2c18d138aa47161ff4d24e806173015bc42d749 /lib/ui
parenta60f2c19a0a962167067547c2a74988012cf2f44 (diff)
downloadaerc-345962e33ccbd18fd672f63684d8248e1211a656.tar.gz
terminal: replace tcell-term with vaxis terminal
Replace tcell terminal with the vaxis terminal. The vaxis terminal is a port of tcell term. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'lib/ui')
-rw-r--r--lib/ui/context.go14
-rw-r--r--lib/ui/ui.go1
2 files changed, 1 insertions, 14 deletions
diff --git a/lib/ui/context.go b/lib/ui/context.go
index 69361120..2ca0d310 100644
--- a/lib/ui/context.go
+++ b/lib/ui/context.go
@@ -5,7 +5,6 @@ import (
"git.sr.ht/~rjarry/aerc/lib/parse"
"git.sr.ht/~rockorager/vaxis"
- "github.com/gdamore/tcell/v2"
)
// A context allows you to draw in a sub-region of the terminal
@@ -136,19 +135,6 @@ func (ctx *Context) Popover(x, y, width, height int, d Drawable) {
})
}
-// SetContent is used to update the content of the Surface at the given
-// location.
-func (ctx *Context) SetContent(x int, y int, ch rune, comb []rune, style tcell.Style) {
- g := []rune{ch}
- g = append(g, comb...)
- ctx.window.SetCell(x, y, vaxis.Cell{
- Character: vaxis.Character{
- Grapheme: string(g),
- },
- Style: tcell.VaxisStyle(style),
- })
-}
-
func (ctx *Context) Size() (int, int) {
return ctx.window.Size()
}
diff --git a/lib/ui/ui.go b/lib/ui/ui.go
index 84c34459..a7233f49 100644
--- a/lib/ui/ui.go
+++ b/lib/ui/ui.go
@@ -125,6 +125,7 @@ func Render() {
state.vx.Window().Clear()
// reset popover for the next Draw
state.popover = nil
+ state.vx.HideCursor()
state.content.Draw(state.ctx)
if state.popover != nil {
// if the Draw resulted in a popover, draw it