branch: externals/diff-hl commit 52af81618af98e784cded5036f04489c38aea725 Author: Dmitry Gutov <dmi...@gutov.dev> Commit: Dmitry Gutov <dmi...@gutov.dev>
diff-hl-stage-finish: Call diff-hl-update at the end Like diff-hl-stage-current-hunk does. --- diff-hl.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/diff-hl.el b/diff-hl.el index d9bc4b4743..50d9f041b3 100644 --- a/diff-hl.el +++ b/diff-hl.el @@ -964,14 +964,18 @@ Pops up a diff buffer that can be edited to choose the changes to stage." (defun diff-hl-stage-finish () (interactive) - (let ((count 0)) - (when (diff-hl-stage-diff diff-hl-stage--orig) + (let ((count 0) + (orig-buffer diff-hl-stage--orig)) + (when (diff-hl-stage-diff orig-buffer) (save-excursion (goto-char (point-min)) (while (re-search-forward diff-hunk-header-re-unified nil t) (cl-incf count))) (message "Staged %d hunks" count) - (bury-buffer)))) + (bury-buffer) + (unless diff-hl-show-staged-changes + (with-current-buffer orig-buffer + (diff-hl-update)))))) (defvar diff-hl-command-map (let ((map (make-sparse-keymap)))