[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/eat b42687f146 5/9: Fix prompt navigation when annotation
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/eat b42687f146 5/9: Fix prompt navigation when annotation is disabled |
Date: |
Tue, 6 Dec 2022 13:58:46 -0500 (EST) |
branch: elpa/eat
commit b42687f1466f48bfb3453d55441f98e30fba8e98
Author: Akib Azmain Turja <akib@disroot.org>
Commit: Akib Azmain Turja <akib@disroot.org>
Fix prompt navigation when annotation is disabled
* eat.el (eat--pre-prompt): Always set
'eat--shell-prompt-begin'.
* eat.el (eat--post-prompt): Always put special prompt end
marking text property.
---
eat.el | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/eat.el b/eat.el
index e00bf649a7..9853c7e75c 100644
--- a/eat.el
+++ b/eat.el
@@ -4241,8 +4241,7 @@ If HOST isn't the host Emacs is running on, don't do
anything."
(defun eat--pre-prompt (_)
"Save the beginning position of shell prompt."
- (when eat-enable-shell-prompt-annotation
- (setq eat--shell-prompt-begin (point-marker))))
+ (setq eat--shell-prompt-begin (point-marker)))
(defun eat--post-prompt (_)
"Put a mark in the marginal area on current line."
@@ -4279,11 +4278,13 @@ If HOST isn't the host Emacs is running on, don't do
anything."
(list 'eat--before-string before-str
'eat--shell-prompt-mark-id identifier
'eat--shell-prompt-mark-overlay ov))
- (push ov eat--shell-prompt-mark-overlays))
- ;; Put a text property to allow previous or next prompts.
- (put-text-property (1- (point)) (point)
- 'eat--shell-prompt-end t))
- (setq eat--shell-prompt-begin nil)))))
+ (push ov eat--shell-prompt-mark-overlays)))
+ (setq eat--shell-prompt-begin nil))))
+ (when eat--shell-prompt-begin
+ (when (< eat--shell-prompt-begin (point))
+ ;; Put a text property to allow previous or next prompts.
+ (put-text-property (1- (point)) (point)
+ 'eat--shell-prompt-end t))))
(defun eat--update-shell-prompt-mark-overlays (buffer)
"Update all overlays used to add mark before shell prompt.
- [nongnu] elpa/eat updated (d35864ca6b -> 693940c733), ELPA Syncer, 2022/12/06
- [nongnu] elpa/eat 693940c733 9/9: * README.org: Add shell integration instructions, ELPA Syncer, 2022/12/06
- [nongnu] elpa/eat 8188f71562 8/9: * eat-tests.el (eat-test-set-cwd): Update test, ELPA Syncer, 2022/12/06
- [nongnu] elpa/eat 62a09caef1 7/9: * eat.el (eat--t-term): Fix initial value of 'cwd', ELPA Syncer, 2022/12/06
- [nongnu] elpa/eat a04999011f 3/9: Annotate shell prompts, ELPA Syncer, 2022/12/06
- [nongnu] elpa/eat e287487b42 6/9: Document everything about shell integration, ELPA Syncer, 2022/12/06
- [nongnu] elpa/eat 2c6afa4dc0 4/9: Add shell prompt navigation commands, ELPA Syncer, 2022/12/06
- [nongnu] elpa/eat 9caa496e45 1/9: Tighter shell integration, ELPA Syncer, 2022/12/06
- [nongnu] elpa/eat b42687f146 5/9: Fix prompt navigation when annotation is disabled,
ELPA Syncer <=
- [nongnu] elpa/eat b4d07cb474 2/9: Add shell commands run in Eat to Emacs history, ELPA Syncer, 2022/12/06