From 14b7b8b31186798630ca11b389acc2d9627dec7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Tue, 22 Jun 2021 01:30:28 +0200 Subject: WIP: ht: dirty working tree --- ht/main.go | 11 +++++++++++ 1 file changed, 11 insertions(+) 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) } } } -- cgit v1.2.3