[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#51016: 28.0.50; 'diff-font-lock-prettify' breaks display of outline
From: |
Matthias Meulien |
Subject: |
bug#51016: 28.0.50; 'diff-font-lock-prettify' breaks display of outline headers |
Date: |
Mon, 22 Nov 2021 23:11:46 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Matthias Meulien <orontee@gmail.com> writes:
> Juri Linkov <juri@linkov.net> writes:
>
>> I confirm there is a relation because the commit f0768d3145
>
> Oh you're right. Sorry.
>
>> However, changing the .+ thing to .* in outline-font-lock-keywords
>> fixes this problem. So we need to decide whether to try to remove
>> entire line mathing from diff-hunk-header-re (not sure how easy to
>> do),
I just skipped last character of `diff-hunk-header-re' (the culprit `$')
when building `diff-outline-regexp'; Cycling is restored when on hunk
headers. Looks safe to me since `diff-hunk-header-re' is unchanged.
>From cf4ccd97e6d6e82faee5b01224c5a3caa8908cc1 Mon Sep 17 00:00:00 2001
From: Matthias Meulien <orontee@gmail.com>
Date: Mon, 22 Nov 2021 23:06:06 +0100
Subject: [PATCH] Fix broken outline minor mode cycling in diff buffers
* lisp/vc/diff-mode.el (diff-setup-buffer-type): Fix outline regexp
matching whole line
---
lisp/vc/diff-mode.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index 8f83aa580e..eeda503afb 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -1588,7 +1588,8 @@ diff-setup-buffer-type
nil)))
(when (eq diff-buffer-type 'git)
(setq diff-outline-regexp
- (concat "\\(^diff --git.*\n\\|" diff-hunk-header-re "\\)"))
+ (concat "\\(^diff --git.*\n\\|"
+ (substring diff-hunk-header-re 0 -1) "\\)"))
(setq-local outline-level #'diff--outline-level))
(setq-local outline-regexp diff-outline-regexp))
--
2.30.2
--
Matthias
- bug#51016: 28.0.50; 'diff-font-lock-prettify' breaks display of outline headers, (continued)
- bug#51016: 28.0.50; 'diff-font-lock-prettify' breaks display of outline headers, Juri Linkov, 2021/11/18
- bug#51016: 28.0.50; 'diff-font-lock-prettify' breaks display of outline headers, Lars Ingebrigtsen, 2021/11/19
- bug#51016: 28.0.50; 'diff-font-lock-prettify' breaks display of outline headers, Juri Linkov, 2021/11/19
- bug#51016: 28.0.50; 'diff-font-lock-prettify' breaks display of outline headers, Lars Ingebrigtsen, 2021/11/20
- bug#51016: 28.0.50; 'diff-font-lock-prettify' breaks display of outline headers, Juri Linkov, 2021/11/20
- bug#51016: 28.0.50; 'diff-font-lock-prettify' breaks display of outline headers, Lars Ingebrigtsen, 2021/11/21
- bug#51016: 28.0.50; 'diff-font-lock-prettify' breaks display of outline headers, Matthias Meulien, 2021/11/21
- bug#51016: 28.0.50; 'diff-font-lock-prettify' breaks display of outline headers, Juri Linkov, 2021/11/21
- bug#51016: 28.0.50; 'diff-font-lock-prettify' breaks display of outline headers, Matthias Meulien, 2021/11/21
- bug#51016: 28.0.50; 'diff-font-lock-prettify' breaks display of outline headers,
Matthias Meulien <=
- bug#51016: 28.0.50; 'diff-font-lock-prettify' breaks display of outline headers, Matthias Meulien, 2021/11/22
- bug#51016: 28.0.50; 'diff-font-lock-prettify' breaks display of outline headers, Lars Ingebrigtsen, 2021/11/24
- bug#51016: 28.0.50; 'diff-font-lock-prettify' breaks display of outline headers, Juri Linkov, 2021/11/24
- bug#51016: 28.0.50; 'diff-font-lock-prettify' breaks display of outline headers, Juri Linkov, 2021/11/21