Fix the bug of visual caret deleting everything
This commit is contained in:
parent
c9ca487475
commit
caef820683
7
p11k.el
7
p11k.el
@ -310,12 +310,19 @@ Use 'window-width' to calculate the total final width."
|
||||
(p11k/caret-color-status eshell-last-command-status)
|
||||
" ")))))
|
||||
|
||||
(defun mir/last-line-p ()
|
||||
"Return t if the point is on the last line of current buffer."
|
||||
(eq
|
||||
(point-max)
|
||||
(point-at-eol)))
|
||||
(defun p11k/modal-caret (&optional throwaway)
|
||||
"Toggle the direction that the prompt points according to `p11k/get-modal-status'."
|
||||
(save-match-data
|
||||
(save-mark-and-excursion
|
||||
(goto-char (point-max))
|
||||
(if (re-search-backward eshell-prompt-regexp nil 'no-error)
|
||||
(let ((inhibit-read-only t)
|
||||
(delete-active-region nil)
|
||||
(new-caret
|
||||
(p11k/caret-color-status
|
||||
eshell-last-command-status)))
|
||||
|
Loading…
Reference in New Issue
Block a user