[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/preview-auto a9cebc08b4: Disable preview for regions co
From: |
ELPA Syncer |
Subject: |
[elpa] externals/preview-auto a9cebc08b4: Disable preview for regions consisting of just backslashes |
Date: |
Fri, 6 Sep 2024 06:58:43 -0400 (EDT) |
branch: externals/preview-auto
commit a9cebc08b4f67488acd27967fd772a0fb93eab1d
Author: Paul Nelson <ultrono@gmail.com>
Commit: Paul Nelson <ultrono@gmail.com>
Disable preview for regions consisting of just backslashes
* preview-auto.el (preview-auto--update-editing-region): Make it so
that backslashes alone do not contribute towards the active editing
region being considered "nonempty".
---
preview-auto.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/preview-auto.el b/preview-auto.el
index 333a769967..7614b4f3ff 100644
--- a/preview-auto.el
+++ b/preview-auto.el
@@ -388,8 +388,10 @@ ORIG-FUN is the original function, and ARGS are its
arguments."
(end (save-excursion
(preview-auto--search (regexp-quote end-string)
limit))))
- ;; Don't preview empty regions.
- (when (string-match-p "[^[:space:]\n\r]"
+ ;; Don't preview essentially empty regions. Exclude
+ ;; backslashes to avoid issues with previewing
+ ;; regions-in-progress such as "$\$".
+ (when (string-match-p "[^[:space:]\n\r\\]"
(buffer-substring-no-properties
(+ begin (length why))
(- end (length end-string))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/preview-auto a9cebc08b4: Disable preview for regions consisting of just backslashes,
ELPA Syncer <=