Fix show-paren-mode when the parentheses is partially visible
* lisp/paren.el (show-paren-function): Support the case where the open paren is partially visible, but enough so to not consider it "off-screen". (Bug#64547)
This commit is contained in:
parent
419b4d4491
commit
4821da1ad7
1 changed files with 13 additions and 1 deletions
|
@ -506,7 +506,19 @@ It is the default value of `show-paren-data-function'."
|
|||
(when (and show-paren-context-when-offscreen
|
||||
(not (eql show-paren--last-pos (point)))
|
||||
(< there-beg here-beg)
|
||||
(not (pos-visible-in-window-p openparen)))
|
||||
;; Either OPENPAREN position is fully visible...
|
||||
(not (or (pos-visible-in-window-p openparen)
|
||||
(let ((dfh4 (* 0.25 (default-font-height)))
|
||||
(part
|
||||
(pos-visible-in-window-p openparen
|
||||
nil t)))
|
||||
;; ...or partially visible, and the
|
||||
;; invisible part is less than 1/4th
|
||||
;; of the default font height
|
||||
(or (< (length part) 4)
|
||||
(and
|
||||
(< (nth 2 part) dfh4)
|
||||
(< (nth 3 part) dfh4)))))))
|
||||
(let ((context (blink-paren-open-paren-line-string
|
||||
openparen))
|
||||
(message-log-max nil))
|
||||
|
|
Loading…
Add table
Reference in a new issue