[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/capf-autosuggest f137fcb 39/63: Fix previous-matching-i
From: |
ELPA Syncer |
Subject: |
[elpa] externals/capf-autosuggest f137fcb 39/63: Fix previous-matching-input if point isn't touching overlay |
Date: |
Wed, 27 Oct 2021 14:58:00 -0400 (EDT) |
branch: externals/capf-autosuggest
commit f137fcbe9705012006850c644e5e29854ad58fa5
Author: jakanakaevangeli <jakanakaevangeli@chiru.no>
Commit: jakanakaevangeli <jakanakaevangeli@chiru.no>
Fix previous-matching-input if point isn't touching overlay
---
capf-autosuggest.el | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/capf-autosuggest.el b/capf-autosuggest.el
index fd0d293..390b8a7 100644
--- a/capf-autosuggest.el
+++ b/capf-autosuggest.el
@@ -301,24 +301,28 @@ inactive."
(defun capf-autosuggest-comint-previous-matching-input-from-input (n)
"Like `comint-previous-matching-input-from-input'.
-But increase arument N by 1, if positive, but not on command
-repetition."
+If N is positive, the command isn't repeated and point is at
+auto-suggested overlay, increase argument N by 1. This is done
+in order to skip the history element already shown by the overlay."
(interactive "p")
(and (not (memq last-command '(comint-previous-matching-input-from-input
comint-next-matching-input-from-input)))
(> n 0)
+ (= (point) (overlay-start capf-autosuggest--overlay))
(setq n (1+ n)))
(comint-previous-matching-input-from-input n)
(setq this-command #'comint-previous-matching-input-from-input))
(defun capf-autosuggest-eshell-previous-matching-input-from-input (n)
"Like `eshell-previous-matching-input-from-input'.
-But increase arument N by 1, if positive, but not on command
-repetition."
+If N is positive, the command isn't repeated and point is at
+auto-suggested overlay, increase argument N by 1. This is done
+in order to skip the history element already shown by the overlay."
(interactive "p")
(and (not (memq last-command '(eshell-previous-matching-input-from-input
eshell-next-matching-input-from-input)))
(> n 0)
+ (= (point) (overlay-start capf-autosuggest--overlay))
(setq n (1+ n)))
(eshell-previous-matching-input-from-input n)
(setq this-command #'eshell-previous-matching-input-from-input))
- [elpa] externals/capf-autosuggest 6432d5f 09/63: Avoid error if all-completions returns invalid strings, (continued)
- [elpa] externals/capf-autosuggest 6432d5f 09/63: Avoid error if all-completions returns invalid strings, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest f9854fb 03/63: Define partial-accept commands individually, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest d374a0b 21/63: Small rearrangement, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest 56796e2 23/63: Minor loop optimization, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest 82c6851 25/63: Merge into one file, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest bdc26ec 31/63: Typo, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest 07cb937 32/63: Added dwim commands/menu-items, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest d5e1ce2 30/63: Rearrange, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest cf91a30 37/63: Added experimental support for minibuffer history, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest d72b37a 35/63: Added readme, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest f137fcb 39/63: Fix previous-matching-input if point isn't touching overlay,
ELPA Syncer <=
- [elpa] externals/capf-autosuggest 8f5d5fa 49/63: Fix last change, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest 1333fb9 41/63: Override face text property, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest 25ddce8 45/63: Fix compiler warning, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest 96394ca 48/63: Simplify accept and send menu-items, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest 6e702a7 47/63: Fix programming typo, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest 54e9d1f 42/63: Fix cursor display issues if overlay text ends with a newline, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest 4b2fbee 62/63: Release version 0.1, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest d8433bc 51/63: Suggest autoload instead of require, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest eb8bd98 52/63: Use while-no-input, make slow capfs slightly more bearable, ELPA Syncer, 2021/10/27
- [elpa] externals/capf-autosuggest 39c9609 55/63: Eliminate the need for setup functions, ELPA Syncer, 2021/10/27