aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/interface-gtk/interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/interface-gtk/interface.c')
-rw-r--r--src/interface-gtk/interface.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/interface-gtk/interface.c b/src/interface-gtk/interface.c
index 7f58c45..25f4ccd 100644
--- a/src/interface-gtk/interface.c
+++ b/src/interface-gtk/interface.c
@@ -1383,7 +1383,6 @@ teco_interface_input_cb(GtkWidget *widget, GdkEvent *event, gpointer user_data)
gdk_window_freeze_updates(top_window);
const teco_view_t *last_view = teco_interface_current_view;
- sptr_t last_pos = teco_interface_ssm(SCI_GETCURRENTPOS, 0, 0);
teco_interrupted = FALSE;
switch (event->type) {
@@ -1409,8 +1408,11 @@ teco_interface_input_cb(GtkWidget *widget, GdkEvent *event, gpointer user_data)
* Scintilla has been patched to avoid any automatic scrolling since that
* has been benchmarked to be a very costly operation.
* Instead we do it only once after every keypress.
+ *
+ * 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 (last_pos != teco_interface_ssm(SCI_GETCURRENTPOS, 0, 0))
+ if (event->type == GDK_KEY_PRESS)
teco_interface_ssm(SCI_SCROLLCARET, 0, 0);
gdk_window_thaw_updates(top_window);