From 3d4ecc12039cf173972d22710ad2acdafe1648ba Mon Sep 17 00:00:00 2001 From: Dmitry Matveyev Date: Fri, 16 Aug 2019 10:24:45 +0300 Subject: [PATCH] Add compatibility for Nim 0.20+ --- src/x11ex.nim | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/x11ex.nim b/src/x11ex.nim index d02e460..3252094 100644 --- a/src/x11ex.nim +++ b/src/x11ex.nim @@ -85,7 +85,8 @@ proc handle_event* (hello: var Hello) = else: discard -var hello = createHello(800, 600, "Hello!") -defer: hello.close() -while hello.running: - hello.handle_event() +block: + var hello = createHello(800, 600, "Hello!") + defer: hello.close() + while hello.running: + hello.handle_event()