branch: externals/diff-hl
commit 88ec194df83009eb89a15f3f6e9c25f3de27d576
Author: Jimmy Yuen Ho Wong <[email protected]>
Commit: Jimmy Yuen Ho Wong <[email protected]>
rename diff-hl-inline-popup to diff-hl-show-hunk-inline
---
diff-hl-inline-popup.el | 256 ++++++++++++++++++++++++------------------------
diff-hl-show-hunk.el | 6 +-
2 files changed, 131 insertions(+), 131 deletions(-)
diff --git a/diff-hl-inline-popup.el b/diff-hl-inline-popup.el
index 0f202aff5a..01c8b99c30 100644
--- a/diff-hl-inline-popup.el
+++ b/diff-hl-inline-popup.el
@@ -1,4 +1,4 @@
-;;; diff-hl-inline-popup.el --- inline popup using phantom overlays -*-
lexical-binding: t -*-
+;;; diff-hl-show-hunk-inline.el --- inline popup using phantom overlays -*-
lexical-binding: t -*-
;; Copyright (C) 2020-2021 Free Software Foundation, Inc.
@@ -26,33 +26,33 @@
(require 'subr-x)
-(defvar diff-hl-inline-popup--current-popup nil "The overlay of the current
inline popup.")
-(defvar diff-hl-inline-popup--current-lines nil "A list of the lines to show
in the popup.")
-(defvar diff-hl-inline-popup--current-index nil "First line showed in popup.")
-(defvar diff-hl-inline-popup--invokinkg-command nil "Command that invoked the
popup.")
-(defvar diff-hl-inline-popup--current-footer nil "String to be displayed in
the footer.")
-(defvar diff-hl-inline-popup--current-header nil "String to be displayed in
the header.")
-(defvar diff-hl-inline-popup--height nil "Height of the popup.")
-(defvar diff-hl-inline-popup--current-custom-keymap nil "Keymap to be added to
the keymap of the inline popup.")
-(defvar diff-hl-inline-popup--close-hook nil "Function to be called when the
popup closes.")
-
-(make-variable-buffer-local 'diff-hl-inline-popup--current-popup)
-(make-variable-buffer-local 'diff-hl-inline-popup--current-lines)
-(make-variable-buffer-local 'diff-hl-inline-popup--current-index)
-(make-variable-buffer-local 'diff-hl-inline-popup--current-header)
-(make-variable-buffer-local 'diff-hl-inline-popup--current-footer)
-(make-variable-buffer-local 'diff-hl-inline-popup--invokinkg-command)
-(make-variable-buffer-local 'diff-hl-inline-popup--current-custom-keymap)
-(make-variable-buffer-local 'diff-hl-inline-popup--height)
-(make-variable-buffer-local 'diff-hl-inline-popup--close-hook)
-
-(defun diff-hl-inline-popup--splice (list offset length)
+(defvar diff-hl-show-hunk-inline--current-popup nil "The overlay of the
current inline popup.")
+(defvar diff-hl-show-hunk-inline--current-lines nil "A list of the lines to
show in the popup.")
+(defvar diff-hl-show-hunk-inline--current-index nil "First line showed in
popup.")
+(defvar diff-hl-show-hunk-inline--invokinkg-command nil "Command that invoked
the popup.")
+(defvar diff-hl-show-hunk-inline--current-footer nil "String to be displayed
in the footer.")
+(defvar diff-hl-show-hunk-inline--current-header nil "String to be displayed
in the header.")
+(defvar diff-hl-show-hunk-inline--height nil "Height of the popup.")
+(defvar diff-hl-show-hunk-inline--current-custom-keymap nil "Keymap to be
added to the keymap of the inline popup.")
+(defvar diff-hl-show-hunk-inline--close-hook nil "Function to be called when
the popup closes.")
+
+(make-variable-buffer-local 'diff-hl-show-hunk-inline--current-popup)
+(make-variable-buffer-local 'diff-hl-show-hunk-inline--current-lines)
+(make-variable-buffer-local 'diff-hl-show-hunk-inline--current-index)
+(make-variable-buffer-local 'diff-hl-show-hunk-inline--current-header)
+(make-variable-buffer-local 'diff-hl-show-hunk-inline--current-footer)
+(make-variable-buffer-local 'diff-hl-show-hunk-inline--invokinkg-command)
+(make-variable-buffer-local 'diff-hl-show-hunk-inline--current-custom-keymap)
+(make-variable-buffer-local 'diff-hl-show-hunk-inline--height)
+(make-variable-buffer-local 'diff-hl-show-hunk-inline--close-hook)
+
+(defun diff-hl-show-hunk-inline--splice (list offset length)
"Compute a sublist of LIST starting at OFFSET, of LENGTH."
(butlast
(nthcdr offset list)
(- (length list) length offset)))
-(defun diff-hl-inline-popup--ensure-enough-lines (pos content-height)
+(defun diff-hl-show-hunk-inline--ensure-enough-lines (pos content-height)
"Ensure there is enough lines below POS to show the inline popup.
CONTENT-HEIGHT specifies the height of the popup."
(let* ((line (line-number-at-pos pos))
@@ -62,40 +62,40 @@ CONTENT-HEIGHT specifies the height of the popup."
(when (< 0 overflow)
(run-with-timer 0.1 nil #'scroll-up overflow))))
-(defun diff-hl-inline-popup--compute-content-height (&optional content-size)
+(defun diff-hl-show-hunk-inline--compute-content-height (&optional
content-size)
"Compute the height of the inline popup.
Default for CONTENT-SIZE is the size of the current lines"
- (let ((content-size (or content-size (length
diff-hl-inline-popup--current-lines)))
+ (let ((content-size (or content-size (length
diff-hl-show-hunk-inline--current-lines)))
(max-size (- (/(window-height) 2) 3)))
(min content-size max-size)))
-(defun diff-hl-inline-popup--compute-content-lines (lines index window-size)
+(defun diff-hl-show-hunk-inline--compute-content-lines (lines index
window-size)
"Compute the lines to show in the popup.
Compute it from LINES starting at INDEX with a WINDOW-SIZE."
(let* ((len (length lines))
(window-size (min window-size len))
(index (min index (- len window-size))))
- (diff-hl-inline-popup--splice lines index window-size)))
+ (diff-hl-show-hunk-inline--splice lines index window-size)))
-(defun diff-hl-inline-popup--compute-header (width &optional header)
+(defun diff-hl-show-hunk-inline--compute-header (width &optional header)
"Compute the header of the popup.
Compute it from some WIDTH, and some optional HEADER text."
- (let* ((scroll-indicator (if (eq diff-hl-inline-popup--current-index 0) "
" " ⬆ "))
+ (let* ((scroll-indicator (if (eq diff-hl-show-hunk-inline--current-index 0)
" " " ⬆ "))
(header (or header ""))
(new-width (- width (length header) (length scroll-indicator)))
(header (if (< new-width 0) "" header))
(new-width (- width (length header) (length scroll-indicator)))
- (line (propertize (concat (diff-hl-inline-popup--separator new-width)
+ (line (propertize (concat (diff-hl-show-hunk-inline--separator
new-width)
header scroll-indicator )
'face '(:underline t))))
(concat line "\n") ))
-(defun diff-hl-inline-popup--compute-footer (width &optional footer)
+(defun diff-hl-show-hunk-inline--compute-footer (width &optional footer)
"Compute the header of the popup.
Compute it from some WIDTH, and some optional FOOTER text."
- (let* ((scroll-indicator (if (>= diff-hl-inline-popup--current-index
- (- (length
diff-hl-inline-popup--current-lines)
- diff-hl-inline-popup--height))
+ (let* ((scroll-indicator (if (>= diff-hl-show-hunk-inline--current-index
+ (- (length
diff-hl-show-hunk-inline--current-lines)
+ diff-hl-show-hunk-inline--height))
" "
" ⬇ "))
(footer (or footer ""))
@@ -104,19 +104,19 @@ Compute it from some WIDTH, and some optional FOOTER
text."
(new-width (- width (length footer) (length scroll-indicator)))
(blank-line (if (display-graphic-p)
""
- (concat "\n" (propertize
(diff-hl-inline-popup--separator width)
+ (concat "\n" (propertize
(diff-hl-show-hunk-inline--separator width)
'face '(:underline t)))))
- (line (propertize (concat (diff-hl-inline-popup--separator new-width)
+ (line (propertize (concat (diff-hl-show-hunk-inline--separator
new-width)
footer scroll-indicator)
'face '(:overline t))))
(concat blank-line "\n" line)))
-(defun diff-hl-inline-popup--separator (width &optional sep)
+(defun diff-hl-show-hunk-inline--separator (width &optional sep)
"Return the horizontal separator with character SEP and a WIDTH."
(let ((sep (or sep ?\s)))
(make-string width sep)))
-(defun diff-hl-inline-popup--available-width ()
+(defun diff-hl-show-hunk-inline--available-width ()
"Compute the available width in chars."
(let ((magic-adjust 3))
(if (not (display-graphic-p))
@@ -132,158 +132,158 @@ Compute it from some WIDTH, and some optional FOOTER
text."
;;
https://emacs.stackexchange.com/questions/5495/how-can-i-determine-the-width-of-characters-on-the-screen
width))))
-(defun diff-hl-inline-popup--compute-popup-str (lines index window-size header
footer)
+(defun diff-hl-show-hunk-inline--compute-popup-str (lines index window-size
header footer)
"Compute the string that represents the popup.
There are some content LINES starting at INDEX, with a WINDOW-SIZE. HEADER and
FOOTER are showed at start and end."
- (let* ((width (diff-hl-inline-popup--available-width))
- (content-lines (diff-hl-inline-popup--compute-content-lines lines
index window-size))
- (header (diff-hl-inline-popup--compute-header width header))
- (footer (diff-hl-inline-popup--compute-footer width footer)))
+ (let* ((width (diff-hl-show-hunk-inline--available-width))
+ (content-lines (diff-hl-show-hunk-inline--compute-content-lines lines
index window-size))
+ (header (diff-hl-show-hunk-inline--compute-header width header))
+ (footer (diff-hl-show-hunk-inline--compute-footer width footer)))
(concat header (string-join content-lines "\n") footer "\n")))
-(defun diff-hl-inline-popup-scroll-to (index)
+(defun diff-hl-show-hunk-inline-scroll-to (index)
"Scroll the inline popup to make visible the line at position INDEX."
- (when diff-hl-inline-popup--current-popup
- (setq diff-hl-inline-popup--current-index (max 0 (min index (- (length
diff-hl-inline-popup--current-lines) diff-hl-inline-popup--height))))
- (let* ((str (diff-hl-inline-popup--compute-popup-str
- diff-hl-inline-popup--current-lines
- diff-hl-inline-popup--current-index
- diff-hl-inline-popup--height
- diff-hl-inline-popup--current-header
- diff-hl-inline-popup--current-footer)))
+ (when diff-hl-show-hunk-inline--current-popup
+ (setq diff-hl-show-hunk-inline--current-index (max 0 (min index (- (length
diff-hl-show-hunk-inline--current-lines) diff-hl-show-hunk-inline--height))))
+ (let* ((str (diff-hl-show-hunk-inline--compute-popup-str
+ diff-hl-show-hunk-inline--current-lines
+ diff-hl-show-hunk-inline--current-index
+ diff-hl-show-hunk-inline--height
+ diff-hl-show-hunk-inline--current-header
+ diff-hl-show-hunk-inline--current-footer)))
;; https://debbugs.gnu.org/38563, `company--replacement-string'.
(add-face-text-property 0 (length str) 'default t str)
(put-text-property 0 1 'cursor 0 str)
- (overlay-put diff-hl-inline-popup--current-popup 'before-string str))))
+ (overlay-put diff-hl-show-hunk-inline--current-popup 'before-string
str))))
-(defun diff-hl-inline-popup--popup-down()
+(defun diff-hl-show-hunk-inline--popup-down()
"Scrolls one line down."
(interactive)
- (diff-hl-inline-popup-scroll-to (1+ diff-hl-inline-popup--current-index) ))
+ (diff-hl-show-hunk-inline-scroll-to (1+
diff-hl-show-hunk-inline--current-index) ))
-(defun diff-hl-inline-popup--popup-up()
+(defun diff-hl-show-hunk-inline--popup-up()
"Scrolls one line up."
(interactive)
- (diff-hl-inline-popup-scroll-to (1- diff-hl-inline-popup--current-index) ))
+ (diff-hl-show-hunk-inline-scroll-to (1-
diff-hl-show-hunk-inline--current-index) ))
-(defun diff-hl-inline-popup--popup-pagedown()
+(defun diff-hl-show-hunk-inline--popup-pagedown()
"Scrolls one page down."
(interactive)
- (diff-hl-inline-popup-scroll-to (+ diff-hl-inline-popup--current-index
diff-hl-inline-popup--height) ))
+ (diff-hl-show-hunk-inline-scroll-to (+
diff-hl-show-hunk-inline--current-index diff-hl-show-hunk-inline--height) ))
-(defun diff-hl-inline-popup--popup-pageup()
+(defun diff-hl-show-hunk-inline--popup-pageup()
"Scrolls one page up."
(interactive)
- (diff-hl-inline-popup-scroll-to (- diff-hl-inline-popup--current-index
diff-hl-inline-popup--height) ))
+ (diff-hl-show-hunk-inline-scroll-to (-
diff-hl-show-hunk-inline--current-index diff-hl-show-hunk-inline--height) ))
-(defvar diff-hl-inline-popup-transient-mode-map
+(defvar diff-hl-show-hunk-inline-transient-mode-map
(let ((map (make-sparse-keymap)))
- (define-key map (kbd "<prior>") #'diff-hl-inline-popup--popup-pageup)
- (define-key map (kbd "M-v") #'diff-hl-inline-popup--popup-pageup)
- (define-key map (kbd "<next>") #'diff-hl-inline-popup--popup-pagedown)
- (define-key map (kbd "C-v") #'diff-hl-inline-popup--popup-pagedown)
- (define-key map (kbd "<up>") #'diff-hl-inline-popup--popup-up)
- (define-key map (kbd "C-p") #'diff-hl-inline-popup--popup-up)
- (define-key map (kbd "<down>") #'diff-hl-inline-popup--popup-down)
- (define-key map (kbd "C-n") #'diff-hl-inline-popup--popup-down)
- (define-key map (kbd "C-g") #'diff-hl-inline-popup-hide)
- (define-key map [escape] #'diff-hl-inline-popup-hide)
- (define-key map (kbd "q") #'diff-hl-inline-popup-hide)
+ (define-key map (kbd "<prior>") #'diff-hl-show-hunk-inline--popup-pageup)
+ (define-key map (kbd "M-v") #'diff-hl-show-hunk-inline--popup-pageup)
+ (define-key map (kbd "<next>") #'diff-hl-show-hunk-inline--popup-pagedown)
+ (define-key map (kbd "C-v") #'diff-hl-show-hunk-inline--popup-pagedown)
+ (define-key map (kbd "<up>") #'diff-hl-show-hunk-inline--popup-up)
+ (define-key map (kbd "C-p") #'diff-hl-show-hunk-inline--popup-up)
+ (define-key map (kbd "<down>") #'diff-hl-show-hunk-inline--popup-down)
+ (define-key map (kbd "C-n") #'diff-hl-show-hunk-inline--popup-down)
+ (define-key map (kbd "C-g") #'diff-hl-show-hunk-inline-hide)
+ (define-key map [escape] #'diff-hl-show-hunk-inline-hide)
+ (define-key map (kbd "q") #'diff-hl-show-hunk-inline-hide)
;;http://ergoemacs.org/emacs/emacs_mouse_wheel_config.html
- (define-key map (kbd "<mouse-4>") #'diff-hl-inline-popup--popup-up)
- (define-key map (kbd "<wheel-up>") #'diff-hl-inline-popup--popup-up)
- (define-key map (kbd "<mouse-5>") #'diff-hl-inline-popup--popup-down)
- (define-key map (kbd "<wheel-down>") #'diff-hl-inline-popup--popup-down)
+ (define-key map (kbd "<mouse-4>") #'diff-hl-show-hunk-inline--popup-up)
+ (define-key map (kbd "<wheel-up>") #'diff-hl-show-hunk-inline--popup-up)
+ (define-key map (kbd "<mouse-5>") #'diff-hl-show-hunk-inline--popup-down)
+ (define-key map (kbd "<wheel-down>")
#'diff-hl-show-hunk-inline--popup-down)
map)
- "Keymap for command `diff-hl-inline-popup-transient-mode'.
+ "Keymap for command `diff-hl-show-hunk-inline-transient-mode'.
Capture all the vertical movement of the point, and converts it
to scroll in the popup")
-(defun diff-hl-inline-popup--ignorable-command-p (command)
+(defun diff-hl-show-hunk-inline--ignorable-command-p (command)
"Decide if COMMAND is a command allowed while showing an inline popup."
;;
https://emacs.stackexchange.com/questions/653/how-can-i-find-out-in-which-keymap-a-key-is-bound
- (let ((keys (where-is-internal command (list
diff-hl-inline-popup--current-custom-keymap
-
diff-hl-inline-popup-transient-mode-map ) t))
- (invoking (eq command diff-hl-inline-popup--invokinkg-command)))
+ (let ((keys (where-is-internal command (list
diff-hl-show-hunk-inline--current-custom-keymap
+
diff-hl-show-hunk-inline-transient-mode-map ) t))
+ (invoking (eq command diff-hl-show-hunk-inline--invokinkg-command)))
(or keys invoking)))
-(defun diff-hl-inline-popup--post-command-hook ()
+(defun diff-hl-show-hunk-inline--post-command-hook ()
"Called each time a command is executed."
(let ((allowed-command (or
- (string-match-p "diff-hl-inline-popup-" (symbol-name
this-command))
- (diff-hl-inline-popup--ignorable-command-p
this-command))))
+ (string-match-p "diff-hl-show-hunk-inline-"
(symbol-name this-command))
+ (diff-hl-show-hunk-inline--ignorable-command-p
this-command))))
(unless allowed-command
- (diff-hl-inline-popup-hide))))
+ (diff-hl-show-hunk-inline-hide))))
-(define-minor-mode diff-hl-inline-popup-transient-mode
+(define-minor-mode diff-hl-show-hunk-inline-transient-mode
"Temporal minor mode to control an inline popup"
:global nil
- (remove-hook 'post-command-hook #'diff-hl-inline-popup--post-command-hook t)
- (set-keymap-parent diff-hl-inline-popup-transient-mode-map nil)
+ (remove-hook 'post-command-hook
#'diff-hl-show-hunk-inline--post-command-hook t)
+ (set-keymap-parent diff-hl-show-hunk-inline-transient-mode-map nil)
- (when diff-hl-inline-popup-transient-mode
- (set-keymap-parent diff-hl-inline-popup-transient-mode-map
- diff-hl-inline-popup--current-custom-keymap)
- (add-hook 'post-command-hook #'diff-hl-inline-popup--post-command-hook 0
t)))
+ (when diff-hl-show-hunk-inline-transient-mode
+ (set-keymap-parent diff-hl-show-hunk-inline-transient-mode-map
+ diff-hl-show-hunk-inline--current-custom-keymap)
+ (add-hook 'post-command-hook #'diff-hl-show-hunk-inline--post-command-hook
0 t)))
;;;###autoload
-(defun diff-hl-inline-popup-hide()
+(defun diff-hl-show-hunk-inline-hide()
"Hide the current inline popup."
(interactive)
- (when diff-hl-inline-popup-transient-mode
- (diff-hl-inline-popup-transient-mode -1))
- (when diff-hl-inline-popup--close-hook
- (funcall diff-hl-inline-popup--close-hook)
- (setq diff-hl-inline-popup--close-hook nil))
- (when diff-hl-inline-popup--current-popup
- (delete-overlay diff-hl-inline-popup--current-popup)
- (setq diff-hl-inline-popup--current-popup nil)))
+ (when diff-hl-show-hunk-inline-transient-mode
+ (diff-hl-show-hunk-inline-transient-mode -1))
+ (when diff-hl-show-hunk-inline--close-hook
+ (funcall diff-hl-show-hunk-inline--close-hook)
+ (setq diff-hl-show-hunk-inline--close-hook nil))
+ (when diff-hl-show-hunk-inline--current-popup
+ (delete-overlay diff-hl-show-hunk-inline--current-popup)
+ (setq diff-hl-show-hunk-inline--current-popup nil)))
;;;###autoload
-(defun diff-hl-inline-popup-show (lines &optional header footer keymap
close-hook point height)
+(defun diff-hl-show-hunk-inline-show (lines &optional header footer keymap
close-hook point height)
"Create a phantom overlay to show the inline popup, with some
content LINES, and a HEADER and a FOOTER, at POINT. KEYMAP is
added to the current keymaps. CLOSE-HOOK is called when the popup
is closed."
- (when diff-hl-inline-popup--current-popup
- (delete-overlay diff-hl-inline-popup--current-popup)
- (setq diff-hl-inline-popup--current-popup nil))
+ (when diff-hl-show-hunk-inline--current-popup
+ (delete-overlay diff-hl-show-hunk-inline--current-popup)
+ (setq diff-hl-show-hunk-inline--current-popup nil))
- (when (< (diff-hl-inline-popup--compute-content-height 99) 2)
+ (when (< (diff-hl-show-hunk-inline--compute-content-height 99) 2)
(user-error "There is no enough vertical space to show the inline popup"))
(let* ((the-point (or point (line-end-position)))
(the-buffer (current-buffer))
(overlay (make-overlay the-point the-point the-buffer)))
(overlay-put overlay 'phantom t)
- (overlay-put overlay 'diff-hl-inline-popup t)
- (setq diff-hl-inline-popup--current-popup overlay)
+ (overlay-put overlay 'diff-hl-show-hunk-inline t)
+ (setq diff-hl-show-hunk-inline--current-popup overlay)
- (setq diff-hl-inline-popup--current-lines
+ (setq diff-hl-show-hunk-inline--current-lines
(mapcar (lambda (s) (replace-regexp-in-string "\n" " " s)) lines))
- (setq diff-hl-inline-popup--current-header header)
- (setq diff-hl-inline-popup--current-footer footer)
- (setq diff-hl-inline-popup--invokinkg-command this-command)
- (setq diff-hl-inline-popup--current-custom-keymap keymap)
- (setq diff-hl-inline-popup--close-hook close-hook)
- (setq diff-hl-inline-popup--height
(diff-hl-inline-popup--compute-content-height height))
- (setq diff-hl-inline-popup--height (min diff-hl-inline-popup--height
- (length
diff-hl-inline-popup--current-lines)))
- ;; (diff-hl-inline-popup--ensure-enough-lines point
diff-hl-inline-popup--height)
- (diff-hl-inline-popup-transient-mode 1)
- (diff-hl-inline-popup-scroll-to 0)
+ (setq diff-hl-show-hunk-inline--current-header header)
+ (setq diff-hl-show-hunk-inline--current-footer footer)
+ (setq diff-hl-show-hunk-inline--invokinkg-command this-command)
+ (setq diff-hl-show-hunk-inline--current-custom-keymap keymap)
+ (setq diff-hl-show-hunk-inline--close-hook close-hook)
+ (setq diff-hl-show-hunk-inline--height
(diff-hl-show-hunk-inline--compute-content-height height))
+ (setq diff-hl-show-hunk-inline--height (min
diff-hl-show-hunk-inline--height
+ (length
diff-hl-show-hunk-inline--current-lines)))
+ ;; (diff-hl-show-hunk-inline--ensure-enough-lines point
diff-hl-show-hunk-inline--height)
+ (diff-hl-show-hunk-inline-transient-mode 1)
+ (diff-hl-show-hunk-inline-scroll-to 0)
overlay))
-(defun diff-hl-inline-popup--hide-all ()
+(defun diff-hl-show-hunk-inline--hide-all ()
"Testing purposes, use in case some inline popups get stuck in a buffer."
(interactive)
- (when diff-hl-inline-popup-transient-mode
- (diff-hl-inline-popup-transient-mode -1))
- (setq diff-hl-inline-popup--current-popup nil)
+ (when diff-hl-show-hunk-inline-transient-mode
+ (diff-hl-show-hunk-inline-transient-mode -1))
+ (setq diff-hl-show-hunk-inline--current-popup nil)
(let* ((all-overlays (overlays-in (point-min) (point-max)))
- (overlays (cl-remove-if-not (lambda (o)(overlay-get o
'diff-hl-inline-popup)) all-overlays)))
+ (overlays (cl-remove-if-not (lambda (o)(overlay-get o
'diff-hl-show-hunk-inline)) all-overlays)))
(dolist (o overlays)
(delete-overlay o))))
-(provide 'diff-hl-inline-popup)
-;;; diff-hl-inline-popup ends here
+(provide 'diff-hl-show-hunk-inline)
+;;; diff-hl-show-hunk-inline ends here
diff --git a/diff-hl-show-hunk.el b/diff-hl-show-hunk.el
index 5a722f54b5..95eced8588 100644
--- a/diff-hl-show-hunk.el
+++ b/diff-hl-show-hunk.el
@@ -36,7 +36,7 @@
;;; Code:
-(require 'diff-hl-inline-popup)
+(require 'diff-hl-show-hunk-inline)
(require 'diff-hl)
(defvar diff-hl-show-hunk-mouse-mode-map
@@ -272,7 +272,7 @@ BUFFER is a buffer with the hunk."
(lambda ()
(overlay-put invisible-overlay 'invisible nil)
(delete-overlay invisible-overlay)
- (diff-hl-inline-popup-hide)))))
+ (diff-hl-show-hunk-inline-hide)))))
(diff-hl-show-hunk--goto-hunk-overlay overlay)
(let ((height
(when smart-lines
@@ -281,7 +281,7 @@ BUFFER is a buffer with the hunk."
(footer "(q)Quit (p)Previous (n)Next (r)Revert (c)Copy
original"))
(unless diff-hl-show-staged-changes
(setq footer (concat footer " (S)Stage")))
- (diff-hl-inline-popup-show
+ (diff-hl-show-hunk-inline-show
propertized-lines
(if (and (boundp 'diff-hl-reference-revision)
diff-hl-reference-revision)
(concat "Diff with " diff-hl-reference-revision)