diff options
| author | Po Lu | 2022-07-22 15:37:28 +0800 |
|---|---|---|
| committer | Po Lu | 2022-07-22 15:37:28 +0800 |
| commit | f173028d156ae7edf08d15e1dbd36037e35068bc (patch) | |
| tree | 6cd170b5670aa8adbb2bb9ed41f34b21fecadf96 /src/window.c | |
| parent | 83c2c36d35f55d012e5dcb2cc566697b225dcf86 (diff) | |
| download | emacs-f173028d156ae7edf08d15e1dbd36037e35068bc.tar.gz emacs-f173028d156ae7edf08d15e1dbd36037e35068bc.zip | |
Fix handling hscroll during drag-and-drop
* lisp/x-dnd.el (x-dnd-hscroll-flags): Delete function.
(x-dnd-get-modifiers, x-dnd-wheel-modifier-type): New functions.
(x-dnd-mwheel-scroll): Use that to determine hscroll instead.
* src/window.c (set_window_hscroll): Mark window as needing
redisplay if the hscroll really changed.
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/window.c b/src/window.c index 8f889585582..3cd2f98a850 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -1275,7 +1275,10 @@ set_window_hscroll (struct window *w, EMACS_INT hscroll) | |||
| 1275 | 1275 | ||
| 1276 | /* Prevent redisplay shortcuts when changing the hscroll. */ | 1276 | /* Prevent redisplay shortcuts when changing the hscroll. */ |
| 1277 | if (w->hscroll != new_hscroll) | 1277 | if (w->hscroll != new_hscroll) |
| 1278 | XBUFFER (w->contents)->prevent_redisplay_optimizations_p = true; | 1278 | { |
| 1279 | XBUFFER (w->contents)->prevent_redisplay_optimizations_p = true; | ||
| 1280 | wset_redisplay (w); | ||
| 1281 | } | ||
| 1279 | 1282 | ||
| 1280 | w->hscroll = new_hscroll; | 1283 | w->hscroll = new_hscroll; |
| 1281 | w->suspend_auto_hscroll = true; | 1284 | w->suspend_auto_hscroll = true; |