unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#38641: 27.0.50; Misbehavior when drawing a rectangular selection with the mouse
@ 2019-12-16 20:07 Konrad Podczeck
  2019-12-16 21:58 ` Mattias Engdegård
  0 siblings, 1 reply; 4+ messages in thread
From: Konrad Podczeck @ 2019-12-16 20:07 UTC (permalink / raw)
  To: 38641


Using the mouse, start drawing a rectangular selection, with the upper
left corner _not_ in the first column. Extend the selection downwards
so that the left boundary of the selection continues to be in the same
column. As soon as one reaches the lower end of the frame, so that a
further extension of the selection produces scrolling of the text, the
position of the selection jumps so that its left boundary appears in the
first column.




In GNU Emacs 27.0.50 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1894.20 Version 10.15.2 (Build 19C57))
 of 2019-12-16 built on Konrads-iMac.local
Windowing system distributor 'Apple', version 10.3.1894
System Description:  Mac OS X 10.15.2

Recent messages:
Loading cus-start...done
Loading tooltip...done
Loading /Applications/Emacs 2.app/Contents/Resources/lisp/leim/leim-list.el (source)...done
Finding pointers to doc strings...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Loading loadup.el (source)...done
<M-s-drag-mouse-1> is undefined [2 times]
Mark set (rectangle mode)
Mark set
Mark set (rectangle mode)

Configured using:
 'configure --with-ns '--enable-locallisppath=/Library/Application
 Support/Emacs/${version}/site-lisp:/Library/Application
 Support/Emacs/site-lisp' --with-modules'

Configured features:
NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES
THREADS PDUMPER

Important settings:
  value of $LANG: en_AT.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml mml-sec epa derived epg epg-config gnus-util
rmail rmail-loaddefs text-property-search mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date rect tex-site
info package easymenu browse-url url-handlers url-parse auth-source
cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json
subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv
cl-loaddefs cl-lib tooltip cus-start eldoc electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize
mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads kqueue cocoa ns multi-tty make-network-process emacs)

Memory information:
((conses 16 288990 17606)
 (symbols 48 22286 1)
 (strings 32 62616 3662)
 (string-bytes 1 2578945)
 (vectors 16 54312)
 (vector-slots 8 1444549 37642)
 (floats 8 195 46)
 (intervals 56 219 0)
 (buffers 1000 13))






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#38641: 27.0.50; Misbehavior when drawing a rectangular selection with the mouse
  2019-12-16 20:07 bug#38641: 27.0.50; Misbehavior when drawing a rectangular selection with the mouse Konrad Podczeck
@ 2019-12-16 21:58 ` Mattias Engdegård
  2019-12-16 23:21   ` Konrad Podczeck
  0 siblings, 1 reply; 4+ messages in thread
From: Mattias Engdegård @ 2019-12-16 21:58 UTC (permalink / raw)
  To: 38641; +Cc: Konrad Podczeck

[-- Attachment #1: Type: text/plain, Size: 50 bytes --]

Thanks for the report. Would you try this patch?


[-- Attachment #2: 0001-Adjust-cursor-column-when-auto-scrolling-during-rect.patch --]
[-- Type: application/octet-stream, Size: 1925 bytes --]

From f82164d1ca70fe7eb2208889cdf0ad2bdd1a06ec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= <mattiase@acm.org>
Date: Mon, 16 Dec 2019 22:42:16 +0100
Subject: [PATCH] Adjust cursor column when auto-scrolling during rectangle
 selection

* lisp/mouse.el (mouse-drag-region-rectangle):
Move cursor to the correct column during auto-scrolling both when
crutches are used and not (bug#38641).
---
 lisp/mouse.el | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/lisp/mouse.el b/lisp/mouse.el
index 32996b2ede..e9156ffe35 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -2037,7 +2037,11 @@ mouse-drag-region-rectangle
                                (funcall adjusted-col mouse-col) 'point)
                             (unless mouse--rectangle-track-cursor
                               (forward-char))
-                            (rectangle--reset-point-crutches)))))
+                            (rectangle--reset-point-crutches))))
+               (scroll-adjust (lambda ()
+                                (move-to-column
+                                 (funcall adjusted-col mouse-col))
+                                (funcall set-col))))
           (if (and (eq window start-window)
                    mouse-row
                    (<= top mouse-row (1- bottom)))
@@ -2051,11 +2055,11 @@ mouse-drag-region-rectangle
              ((< mouse-row top)
               (mouse-scroll-subr
                start-window (- mouse-row top) nil start-point
-               set-col))
+               scroll-adjust))
              ((>= mouse-row bottom)
               (mouse-scroll-subr
                start-window (1+ (- mouse-row bottom)) nil start-point
-               set-col)))))))
+               scroll-adjust)))))))
     (condition-case err
         (progn
           (setq track-mouse t)
-- 
2.21.0 (Apple Git-122.2)


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#38641: 27.0.50; Misbehavior when drawing a rectangular selection with the mouse
  2019-12-16 21:58 ` Mattias Engdegård
@ 2019-12-16 23:21   ` Konrad Podczeck
  2019-12-17  9:05     ` Mattias Engdegård
  0 siblings, 1 reply; 4+ messages in thread
From: Konrad Podczeck @ 2019-12-16 23:21 UTC (permalink / raw)
  To: Mattias Engdegård; +Cc: 38641

Yes, the patch does the job. Thanks,

Konrad


> Am 16.12.2019 um 22:58 schrieb Mattias Engdegård <mattiase@acm.org>:
> 
> Thanks for the report. Would you try this patch?
> 
> <0001-Adjust-cursor-column-when-auto-scrolling-during-rect.patch>






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#38641: 27.0.50; Misbehavior when drawing a rectangular selection with the mouse
  2019-12-16 23:21   ` Konrad Podczeck
@ 2019-12-17  9:05     ` Mattias Engdegård
  0 siblings, 0 replies; 4+ messages in thread
From: Mattias Engdegård @ 2019-12-17  9:05 UTC (permalink / raw)
  To: Konrad Podczeck; +Cc: 38641-done

17 dec. 2019 kl. 00.21 skrev Konrad Podczeck <konrad.podczeck@univie.ac.at>:
> 
> Yes, the patch does the job. Thanks,

That's good to hear. Danke!
Patch pushed and report resolved.






^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-12-17  9:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-16 20:07 bug#38641: 27.0.50; Misbehavior when drawing a rectangular selection with the mouse Konrad Podczeck
2019-12-16 21:58 ` Mattias Engdegård
2019-12-16 23:21   ` Konrad Podczeck
2019-12-17  9:05     ` Mattias Engdegård

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).