diff options
author | Juri Linkov <juri@linkov.net> | 2024-03-25 09:45:08 +0200 |
---|---|---|
committer | Juri Linkov <juri@linkov.net> | 2024-03-25 09:48:28 +0200 |
commit | f54b1d9f7b7a977ee4856c778a309c900ce9e8fa (patch) | |
tree | 752fb5ed689ac2a0bef65a422b6d0a05a1d43508 | |
parent | c2bb763580f94f39e7290e6c47d09ede185c3818 (diff) | |
download | emacs-f54b1d9f7b7a977ee4856c778a309c900ce9e8fa.tar.gz |
* lisp/vc/diff-mode.el (diff-setup-buffer-type): Remove "\n" from regexp.
Remove extra "\n" from the end of the "diff --git.*" part
of 'diff-outline-regexp' because "\n" is not used in outline-regexp
and causes problems in such cases like when killing hunks
in the diff buffer with outline-minor-mode that loses
the outline icons because outline--fix-buttons-after-change and
outline--fix-up-all-buttons are limited to the single line and
can't match an outline line with a regexp that ends with "\n".
-rw-r--r-- | lisp/vc/diff-mode.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 0f393ba86a2..66043059d14 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -1619,7 +1619,7 @@ modified lines of the diff." nil))) (when (eq diff-buffer-type 'git) (setq diff-outline-regexp - (concat "\\(^diff --git.*\n\\|" diff-hunk-header-re "\\)"))) + (concat "\\(^diff --git.*\\|" diff-hunk-header-re "\\)"))) (setq-local outline-level #'diff--outline-level) (setq-local outline-regexp diff-outline-regexp)) |