]> git.eshelyaron.com Git - emacs.git/commit
eshell-next-prompt: More precisely navigate to the prompt (bug#63748)
authorTony Zorman <soliditsallgood@mailbox.org>
Sat, 3 Jun 2023 12:23:19 +0000 (14:23 +0200)
committerJim Porter <jporterbugs@gmail.com>
Thu, 15 Jun 2023 16:40:12 +0000 (09:40 -0700)
commitf2aae8b879baa4986b69af7ee54fe4eb987b99d6
tree86a96b1f93059937fa570485f09395ed2da57d88
parent1acce3b5c7fdf0b2a7301db25dfc2a616df36744
eshell-next-prompt: More precisely navigate to the prompt (bug#63748)

* lisp/eshell/em-prompt.el (eshell-next-prompt): Navigate to the
current prompt more accurately by using text properties instead of
going to the beginning of the line.  This is important for multiline
prompts, as they don't necessarily start at the beginning of the
current line.

* test/lisp/eshell/em-prompt-tests.el
(em-prompt-test--with-multiline):
Execute a given body with a multiline prompt.

(em-prompt-test/next-previous-prompt-with):
(em-prompt-test/forward-backward-matching-input-with):
Helper functions for code reuse.

(em-prompt-test/forward-backward-matching-input):
(em-prompt-test/next-previous-prompt):
Rewrite in terms of the appropriate helper functions.

(em-prompt-test/next-previous-prompt-multiline):
(em-prompt-test/forward-backward-matching-input-multiline):
Add multiline variants of existing tests.
lisp/eshell/em-prompt.el
test/lisp/eshell/em-prompt-tests.el