about summary refs log tree commit diff stats
path: root/src/buffer
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2022-12-01 09:21:21 +0100
committerbptato <nincsnevem662@gmail.com>2022-12-01 09:21:21 +0100
commit81f800cb813d36d5339a3ab17938e0afa2089899 (patch)
tree03d04e679acccb54f147893adf3ef3a72d68b341 /src/buffer
parentb1794c0961a5efb30a0dafa34845bedf49261819 (diff)
downloadchawan-81f800cb813d36d5339a3ab17938e0afa2089899.tar.gz
Make redraw() actually clear the screen
It's more useful this way.
Diffstat (limited to 'src/buffer')
-rw-r--r--src/buffer/container.nim4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/buffer/container.nim b/src/buffer/container.nim
index dd76f449..6960f260 100644
--- a/src/buffer/container.nim
+++ b/src/buffer/container.nim
@@ -50,6 +50,8 @@ type
       location*: URL
     of ALERT:
       msg*: string
+    of UPDATE:
+      force*: bool
     else: discard
 
   Highlight* = ref object
@@ -275,7 +277,7 @@ proc requestLines*(container: Container, w = container.lineWindow) =
       container.triggerEvent(UPDATE))
 
 proc redraw*(container: Container) {.jsfunc.} =
-  container.triggerEvent(UPDATE)
+  container.triggerEvent(ContainerEvent(t: UPDATE, force: true))
 
 proc sendCursorPosition*(container: Container) =
   container.iface.updateHover(container.cursorx, container.cursory).then(proc(res: UpdateHoverResult) =