don't modify prompt if it isn't there
This commit is contained in:
parent
2de038abaf
commit
3294ba546e
19
p11k.el
19
p11k.el
@ -303,15 +303,16 @@ Use 'window-width' to calculate the total final width."
|
||||
"Toggle the direction that the prompt points according to `p11k/get-modal-status'."
|
||||
(save-match-data
|
||||
(save-mark-and-excursion
|
||||
(let ((inhibit-read-only t)
|
||||
(new-caret
|
||||
(p11k/caret-color-status
|
||||
eshell-last-command-status)))
|
||||
(goto-char (point-max))
|
||||
(re-search-backward eshell-prompt-regexp)
|
||||
(goto-char (point-at-bol))
|
||||
(delete-forward-char 1)
|
||||
(insert new-caret))
|
||||
(if (re-search-backward eshell-prompt-regexp nil 'no-error)
|
||||
(let ((inhibit-read-only t)
|
||||
(new-caret
|
||||
(p11k/caret-color-status
|
||||
eshell-last-command-status)))
|
||||
(goto-char (point-max))
|
||||
(re-search-backward eshell-prompt-regexp)
|
||||
(goto-char (point-at-bol))
|
||||
(delete-forward-char 1)
|
||||
(insert new-caret)))
|
||||
)))
|
||||
|
||||
(defun p11k/esh-transient-prompt ()
|
||||
|
Loading…
Reference in New Issue
Block a user