[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemacs-commit] qemacs qe.c
From: |
Charlie Gordon |
Subject: |
[Qemacs-commit] qemacs qe.c |
Date: |
Fri, 28 Mar 2008 08:35:07 +0000 |
CVSROOT: /cvsroot/qemacs
Module name: qemacs
Changes by: Charlie Gordon <chqrlie> 08/03/28 08:35:07
Modified files:
. : qe.c
Log message:
prevent mouse wheel scrolling from moving the cursor if not needed
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/qe.c?cvsroot=qemacs&r1=1.70&r2=1.71
Patches:
Index: qe.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/qe.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -b -r1.70 -r1.71
--- qe.c 26 Mar 2008 20:43:55 -0000 1.70
+++ qe.c 28 Mar 2008 08:35:06 -0000 1.71
@@ -1024,6 +1024,7 @@
line_height = get_line_height(s->screen, s->default_style);
h = 1;
if (abs(dir) == 2) {
+ /* one page at a time: C-v / M-v */
dir /= 2;
h = (s->height / line_height) - 1;
if (h < 1)
@@ -6689,16 +6690,19 @@
if (mouse_x >= e->xleft && mouse_x < e->xleft + e->width &&
mouse_y >= e->ytop && mouse_y < e->ytop + e->height) {
if (e->mode->mouse_goto) {
+ switch (ev->button_event.button) {
+ case QE_BUTTON_LEFT:
save_selection();
e->mode->mouse_goto(e, mouse_x - e->xleft,
mouse_y - e->ytop);
- switch (ev->button_event.button) {
- case QE_BUTTON_LEFT:
motion_type = MOTION_TEXT;
motion_x = 0; /* indicate first move */
motion_target = e;
break;
case QE_BUTTON_MIDDLE:
+ save_selection();
+ e->mode->mouse_goto(e, mouse_x - e->xleft,
+ mouse_y - e->ytop);
do_yank(e);
break;
case QE_WHEEL_UP: