branch: externals/diff-hl commit e42d0153123d89779191bec6f15697c99c1eea6f Author: Dmitry Gutov <dmi...@gutov.dev> Commit: Dmitry Gutov <dmi...@gutov.dev>
diff-hl-show-hunk--posframe-hide: Remove GNOME workaround Couldn't reproduce the problem, and this code caused the original frame to be selected after several calls to diff-hl-show-hunk-next, for example (because after the first one diff-hl-show-hunk--frame becomes non-nil, so we got a timer which goes back to the original frame). --- diff-hl-show-hunk-posframe.el | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/diff-hl-show-hunk-posframe.el b/diff-hl-show-hunk-posframe.el index 014d3f263e..f5f24e2ee3 100644 --- a/diff-hl-show-hunk-posframe.el +++ b/diff-hl-show-hunk-posframe.el @@ -76,15 +76,7 @@ Customize it to change the base properties of the text.") (interactive) (diff-hl-show-hunk-posframe--transient-mode -1) (when (frame-live-p diff-hl-show-hunk--frame) - (make-frame-invisible diff-hl-show-hunk--frame)) - (when diff-hl-show-hunk--original-frame - (when (frame-live-p diff-hl-show-hunk--original-frame) - (let ((frame diff-hl-show-hunk--original-frame)) - (select-frame-set-input-focus frame) - ;; In Gnome, sometimes the input focus is not restored to the - ;; original frame, so we try harder in a while - (run-with-timer 0.1 nil (lambda () (select-frame-set-input-focus frame))))) - (setq diff-hl-show-hunk--original-frame nil))) + (make-frame-invisible diff-hl-show-hunk--frame))) (defvar diff-hl-show-hunk-posframe--transient-mode-map (let ((map (make-sparse-keymap)))