[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/diff-hl ba1e50c 10/10: Remove excessive redisplays, th
From: |
ELPA Syncer |
Subject: |
[elpa] externals/diff-hl ba1e50c 10/10: Remove excessive redisplays, they caused blinking |
Date: |
Mon, 22 Feb 2021 22:57:16 -0500 (EST) |
branch: externals/diff-hl
commit ba1e50c24263f34e9e6c317ba243d185fa20e6e9
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>
Remove excessive redisplays, they caused blinking
---
diff-hl-show-hunk.el | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/diff-hl-show-hunk.el b/diff-hl-show-hunk.el
index 6e23c77..5d109c4 100644
--- a/diff-hl-show-hunk.el
+++ b/diff-hl-show-hunk.el
@@ -286,17 +286,6 @@ BUFFER is a buffer with the hunk."
(diff-hl-show-hunk-hide)
(diff-hl-revert-hunk))
-(defun diff-hl-show-hunk-ensure-hunk-visible (&optional goto-start)
- "Ensure that the end of `diff-hl-show-hunk--original-overlay',
-and maybe the start (if GOTO-START), is visible."
- (let* ((overlay diff-hl-show-hunk--original-overlay))
- (when overlay
- (goto-char (overlay-end overlay)))
- ;; Window scrolls to position only on next redisplay
- (redisplay t)
- (when goto-start
- (goto-char (overlay-start overlay)))))
-
;;;###autoload
(defun diff-hl-show-hunk-previous ()
"Go to previous hunk/change and show it."
@@ -322,7 +311,8 @@ of `diff-hl-show-hunk'."
"Tries to display the whole overlay, and place the point at the
end of the OVERLAY, so posframe/inline is placed below the hunk."
(goto-char (overlay-start overlay))
- (redisplay)
+ (when (< (point) (window-start))
+ (set-window-start nil (point)))
(goto-char (1- (overlay-end overlay))))
;;;###autoload
@@ -377,7 +367,6 @@ The backend is determined by `diff-hl-show-hunk-function'."
((let ((buffer-and-line (diff-hl-show-hunk-buffer)))
(setq diff-hl-show-hunk--original-buffer (current-buffer))
(setq diff-hl-show-hunk--original-window (selected-window))
- (diff-hl-show-hunk-ensure-hunk-visible)
(apply diff-hl-show-hunk-function buffer-and-line))
;; We could fall back to `diff-hl-diff-goto-hunk', but the
;; current default should work in all environments (both GUI
- [elpa] externals/diff-hl updated (4c46b3b -> ba1e50c), ELPA Syncer, 2021/02/22
- [elpa] externals/diff-hl 39b8455 06/10: Fold diff-hl-show-hunk-mode into the "main" mode, ELPA Syncer, 2021/02/22
- [elpa] externals/diff-hl 6c34a01 04/10: Minor touches, ELPA Syncer, 2021/02/22
- [elpa] externals/diff-hl 4460d1c 03/10: Use lexical-binding in two remaining filesg, ELPA Syncer, 2021/02/22
- [elpa] externals/diff-hl ba1e50c 10/10: Remove excessive redisplays, they caused blinking,
ELPA Syncer <=
- [elpa] externals/diff-hl 414ccac 07/10: More reflowing of code, ELPA Syncer, 2021/02/22
- [elpa] externals/diff-hl 3aa5a7e 08/10: Make sure the "underlying face" does not affect the popup's display, ELPA Syncer, 2021/02/22
- [elpa] externals/diff-hl 679f557 01/10: New feature: diff-hl-show-hunk, ELPA Syncer, 2021/02/22
- [elpa] externals/diff-hl ba905d8 02/10: Drop compatibility with Emacs < 25, ELPA Syncer, 2021/02/22
- [elpa] externals/diff-hl 033e880 05/10: Remove the gif, ELPA Syncer, 2021/02/22
- [elpa] externals/diff-hl 5c65ada 09/10: Fix one warning, ELPA Syncer, 2021/02/22