about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-08-31 22:59:13 +0200
committerbptato <nincsnevem662@gmail.com>2023-08-31 22:59:13 +0200
commit872e5c22493e3bfde6f818ec4362c205ba8e39d5 (patch)
treeb2fc04067b8a8a96f9c8b63531f9c78a5af22b46
parent3a7d189d88747d119ab475c96e067b86c4cd2957 (diff)
downloadchawan-872e5c22493e3bfde6f818ec4362c205ba8e39d5.tar.gz
buffer: fix repaint on click events
-rw-r--r--src/buffer/buffer.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/buffer/buffer.nim b/src/buffer/buffer.nim
index 0b3c5d95..94389e58 100644
--- a/src/buffer/buffer.nim
+++ b/src/buffer/buffer.nim
@@ -1216,7 +1216,8 @@ proc click*(buffer: Buffer, cursorx, cursory: int): ClickResult {.proxy.} =
   var called = false
   if buffer.config.scripting:
     let elem = buffer.getCursorElement(cursorx, cursory)
-    if buffer.dispatchEvent("click", elem):
+    called = buffer.dispatchEvent("click", elem)
+    if called:
       buffer.do_reshape()
   let clickable = buffer.getCursorClickable(cursorx, cursory)
   if clickable != nil: