[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 6cd3b7a: Tweak mouse-face highlighting of Occur buf
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master 6cd3b7a: Tweak mouse-face highlighting of Occur buffers |
Date: |
Mon, 15 Jul 2019 14:14:00 -0400 (EDT) |
branch: master
commit 6cd3b7a62b755f8cd5ff9b02c227f133abfb4ec2
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
Tweak mouse-face highlighting of Occur buffers
* lisp/replace.el (occur-engine): Ensure that the mouse highlight
is done over the entire line (bug#27846).
---
lisp/replace.el | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/lisp/replace.el b/lisp/replace.el
index 7839bed..7c6c6fc 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -1751,7 +1751,7 @@ See also `multi-occur'."
(append
(when prefix-face
`(font-lock-face ,prefix-face))
- `(occur-prefix t mouse-face (highlight)
+ `(occur-prefix t
;; Allow insertion of text
;; at the end of the prefix
;; (for Occur Edit mode).
@@ -1764,23 +1764,26 @@ See also `multi-occur'."
;; We don't put `mouse-face' on the newline,
;; because that loses. And don't put it
;; on context lines to reduce flicker.
- (propertize curstring 'mouse-face (list
'highlight)
+ (propertize curstring
'occur-target marker
'follow-link t
'help-echo
"mouse-2: go to this occurrence"))
(out-line
- (concat
- match-prefix
- ;; Add non-numeric prefix to all non-first lines
- ;; of multi-line matches.
+ ;; Add non-numeric prefix to all non-first lines
+ ;; of multi-line matches.
+ (concat
(replace-regexp-in-string
"\n"
(if prefix-face
(propertize
"\n :" 'font-lock-face prefix-face)
"\n :")
- match-str)
+ ;; Add mouse face in one section to
+ ;; ensure the prefix and the string
+ ;; get a contiguous highlight.
+ (propertize (concat match-prefix match-str)
+ 'mouse-face 'highlight))
;; Add marker at eol, but no mouse props.
(propertize "\n" 'occur-target marker)))
(data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 6cd3b7a: Tweak mouse-face highlighting of Occur buffers,
Lars Ingebrigtsen <=