shithub: orca

Download patch

ref: 34ed78d7afb008b9c53a7f10e99df9acc324aeeb
parent: 263aa0e2a5adb40d9807a9ac654f552f66d93988
author: cancel <cancel@cancel.fm>
date: Mon Dec 10 22:35:28 EST 2018

Add workaround for mouse position reporting problems

--- a/tui_main.c
+++ b/tui_main.c
@@ -1039,6 +1039,12 @@
       // only when needed, otherwise some terminals will send movement updates
       // when we don't want them.
       printf("\033[?1003h\n");
+      // need to do this or double clicking can cause terminal state to get
+      // corrupted, since we're bypassing curses here. might cause flicker.
+      // wish i could figure out why report mouse position isn't working on its
+      // own.
+      fflush(stdout);
+      wclear(stdscr);
       a->is_mouse_down = true;
       a->tui_cursor.y = y;
       a->tui_cursor.x = x;