[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil-goggles 1fd103dc13 177/225: evil-goggles--show-p: all
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil-goggles 1fd103dc13 177/225: evil-goggles--show-p: allow the "whitespace-only" check to be skipped |
Date: |
Wed, 12 Jan 2022 08:59:06 -0500 (EST) |
branch: elpa/evil-goggles
commit 1fd103dc13d629edebdf042b75f951e6fddc265b
Author: Evgeni Kolev <evgenysw@gmail.com>
Commit: Evgeni Kolev <evgenysw@gmail.com>
evil-goggles--show-p: allow the "whitespace-only" check to be skipped
---
evil-goggles.el | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/evil-goggles.el b/evil-goggles.el
index a9ec93497b..f36b2216cb 100644
--- a/evil-goggles.el
+++ b/evil-goggles.el
@@ -149,6 +149,9 @@ overlay must not be re-displayed.")
(defvar evil-goggles--force-block nil
"When non-nil, force the hint about to be shown to be a block.")
+(defvar evil-goggles--hint-on-empty-lines nil
+ "When nil, the default, function `evil-goggles--show-p' will not return t
for whitespace-only regions.")
+
(defun evil-goggles--show-p (beg end)
"Return t if the overlay should be displayed in region BEG to END."
(and (not evil-inhibit-operator-value)
@@ -164,8 +167,10 @@ overlay must not be re-displayed.")
(not (evil-insert-state-p))
;; don't show overlay when evil-mc has active cursors
(not (and (fboundp 'evil-mc-has-cursors-p) (evil-mc-has-cursors-p)))
- ;; don't show overlay when the region has nothing but whitespace
- (not (null (string-match-p "[^ \t\n]" (buffer-substring-no-properties
beg end))))))
+ ;; don't show hint when the region has nothing but whitespace, but skip
this check if `evil-goggles--hint-on-empty-lines' is t
+ (if evil-goggles--hint-on-empty-lines
+ t
+ (not (null (string-match-p "[^ \t\n]" (buffer-substring-no-properties
beg end)))))))
(defun evil-goggles--overlay-insert-behind-hook (ov afterp beg end &optional
len)
"Function which grows/shriks the overlay OV when its text changes.
- [nongnu] elpa/evil-goggles 9a1ddbda3e 164/225: Add helper function on inherit from diff-refine-* faces, (continued)
- [nongnu] elpa/evil-goggles 9a1ddbda3e 164/225: Add helper function on inherit from diff-refine-* faces, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles b611a140a2 162/225: Highlight the whole line when pasting a whole line, not just the text, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 690dd7aba3 165/225: Pulse only if the face defines a background, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles d1683b3353 167/225: Pulse if the face inherits a background, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles d4b0ea224d 169/225: Add tests covering the decision whether to pulse or not, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles b620c7512c 170/225: Update README, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 2670fdf664 172/225: Revert `evaporate` overlay property, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 6d3247db6c 173/225: Enable pulsing by default on graphical displays, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles e2cccdf0c0 174/225: Tweak Makefile, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles a1a62d2b56 175/225: Fix failing CI by using latest evil-tests.el, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 1fd103dc13 177/225: evil-goggles--show-p: allow the "whitespace-only" check to be skipped,
ELPA Syncer <=
- [nongnu] elpa/evil-goggles aad4b44727 181/225: evil-goggles--show-hint: fix value of evil-goggles--force-block, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles deab4966d7 183/225: README: reverse NEWS, newest on top, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles a7340dbb49 185/225: Run travis tests on Emacs 25.3, set `load-prefer-newer` to t in tests, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 89fcaebb6e 187/225: Add hint for `c`, `C` and `S` actions #18, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 57f45c2582 189/225: Temporarily disable change hint until #19 is resolved, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles c0afde5d66 202/225: Remove depracated variable, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 2e5452b6a5 216/225: Revert "evil-goggles--show-p: no need to check evil-inhibit-operator-value", ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 78454a7e8b 220/225: Merge pull request #24 from unhammer/count-lines-speedup, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 1f8ca71acd 221/225: Fix custom variable's label, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles fa7dca4f82 016/225: Cleanup delete advice, ELPA Syncer, 2022/01/12