aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/interface-curses/interface.c
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2025-04-16 18:11:53 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2025-04-16 18:15:05 +0300
commit77adddb6d19a69b25c4077af8b3d878c4ad9c439 (patch)
tree84b3b1ffd5ea5e359d4b433d5f73a3ddd801846b /src/interface-curses/interface.c
parent29fe0a121d967b7bfbe487e11fd877df13512bf7 (diff)
downloadsciteco-77adddb6d19a69b25c4077af8b3d878c4ad9c439.tar.gz
curses: minor cleanup - avoid preprocessor statements
Diffstat (limited to 'src/interface-curses/interface.c')
-rw-r--r--src/interface-curses/interface.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/interface-curses/interface.c b/src/interface-curses/interface.c
index e9099ce..a71ca20 100644
--- a/src/interface-curses/interface.c
+++ b/src/interface-curses/interface.c
@@ -2074,7 +2074,12 @@ teco_interface_event_loop_iter(void)
/* ANY of the mouse events */
if (!teco_interface_getmouse(error))
return;
- break;
+ /*
+ * Do not auto-scroll on mouse events, so you can scroll the view manually
+ * in the ^KMOUSE macro, allowing dot to be outside of the view.
+ */
+ teco_interface_refresh();
+ return;
#endif
/*
@@ -2126,17 +2131,7 @@ teco_interface_event_loop_iter(void)
* Instead we do it only once after almost every keypress.
* If possible, the vertical scrolling position is preserved, which helps
* for instance if the buffer contents are deleted and restored later on.
- *
- * The only exception is mouse events, so you can scroll the view manually
- * in the ^KMOUSE macro, allowing dot to be outside of the view.
*/
-#if NCURSES_MOUSE_VERSION >= 2
- if (key == KEY_MOUSE) {
- teco_interface_refresh();
- return;
- }
-#endif
-
if (teco_interface_current_view == last_view)
teco_interface_ssm(SCI_SETFIRSTVISIBLELINE, last_vpos, 0);
teco_interface_ssm(SCI_SCROLLCARET, 0, 0);