aboutsummaryrefslogtreecommitdiff
path: root/ht/main.go
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2021-06-22 01:30:28 +0200
committerPřemysl Eric Janouch <p@janouch.name>2024-11-03 06:12:31 +0100
commite8453669ac7360631e07fbf128586ce9fbc8a06e (patch)
tree34f31a9871dc38cd0215ceb1d6bd7bb4178c7eef /ht/main.go
parentb66585c8eab2acd21ac5e975adf6925fa1e4d1c4 (diff)
downloadhaven-e8453669ac7360631e07fbf128586ce9fbc8a06e.tar.gz
haven-e8453669ac7360631e07fbf128586ce9fbc8a06e.tar.xz
haven-e8453669ac7360631e07fbf128586ce9fbc8a06e.zip
WIP: ht: dirty working tree
Diffstat (limited to 'ht/main.go')
-rw-r--r--ht/main.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/ht/main.go b/ht/main.go
index 95938d8..80adb95 100644
--- a/ht/main.go
+++ b/ht/main.go
@@ -514,6 +514,16 @@ func onResize(width, height uint16) {
winW, winH = width, height
// We should receive an ExposeEvent soon.
// TODO: Track the bottom of the virtual terminal screen.
+ // - Adjust the top line index, if necessary (screen got higher).
+}
+
+func write(r rune) {
+ // TODO: Write over the current scrollback position,
+ // with the current attributes.
+
+ // TODO: Make space in the scrollback so that we have somewhere to write to.
+ // TODO: Cause a redraw.
+ // - How to invalidate a region?
}
func onKeyPress(ks xproto.Keysym) {
@@ -523,6 +533,7 @@ func onKeyPress(ks xproto.Keysym) {
return
default:
if r := KeysymToRune(ks); r > 0 {
+ write(r)
}
}
}