don't modify prompt if it isn't there

This commit is contained in:
Miranda Marquez 2024-04-07 15:41:14 -08:00
parent 2de038abaf
commit 3294ba546e

View File

@ -303,6 +303,7 @@ 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
(if (re-search-backward eshell-prompt-regexp nil 'no-error)
(let ((inhibit-read-only t)
(new-caret
(p11k/caret-color-status
@ -311,7 +312,7 @@ Use 'window-width' to calculate the total final width."
(re-search-backward eshell-prompt-regexp)
(goto-char (point-at-bol))
(delete-forward-char 1)
(insert new-caret))
(insert new-caret)))
)))
(defun p11k/esh-transient-prompt ()