* lisp/comint.el (comint-line-beginning-position): Revert searching for
the prompt when comint-use-prompt-regexp is non-nil because it doesn't distinguish input from output. Check the field property `output' for the case when comint-use-prompt-regexp is nil. Fixes: debbugs:19710
This commit is contained in:
parent
65d8ac7c37
commit
6f2971ab76
2 changed files with 12 additions and 3 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2015-02-19 Juri Linkov <juri@linkov.net>
|
||||||
|
|
||||||
|
* comint.el (comint-line-beginning-position): Revert searching for
|
||||||
|
the prompt when comint-use-prompt-regexp is non-nil because it
|
||||||
|
doesn't distinguish input from output. Check the field property
|
||||||
|
`output' for the case when comint-use-prompt-regexp is nil.
|
||||||
|
(Bug#19710)
|
||||||
|
|
||||||
2015-02-15 Jérémy Compostella <jeremy.compostella@gmail.com>
|
2015-02-15 Jérémy Compostella <jeremy.compostella@gmail.com>
|
||||||
|
|
||||||
* net/tramp-sh.el (tramp-remote-process-environment): Disable paging
|
* net/tramp-sh.el (tramp-remote-process-environment): Disable paging
|
||||||
|
|
|
@ -2267,8 +2267,6 @@ a buffer local variable."
|
||||||
;; Use comint-prompt-regexp
|
;; Use comint-prompt-regexp
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(beginning-of-line)
|
(beginning-of-line)
|
||||||
(unless (looking-at comint-prompt-regexp)
|
|
||||||
(re-search-backward comint-prompt-regexp nil t))
|
|
||||||
(comint-skip-prompt)
|
(comint-skip-prompt)
|
||||||
(point))
|
(point))
|
||||||
;; Use input fields. Note that, unlike the behavior of
|
;; Use input fields. Note that, unlike the behavior of
|
||||||
|
@ -2278,7 +2276,10 @@ a buffer local variable."
|
||||||
;; if there are two fields on a line, then the first one is the
|
;; if there are two fields on a line, then the first one is the
|
||||||
;; prompt, and the second one is an input field, and is front-sticky
|
;; prompt, and the second one is an input field, and is front-sticky
|
||||||
;; (as input fields should be).
|
;; (as input fields should be).
|
||||||
(constrain-to-field (field-beginning) (line-end-position))))
|
(constrain-to-field (if (eq (field-at-pos (point)) 'output)
|
||||||
|
(line-beginning-position)
|
||||||
|
(field-beginning))
|
||||||
|
(line-end-position))))
|
||||||
|
|
||||||
(defun comint-bol (&optional arg)
|
(defun comint-bol (&optional arg)
|
||||||
"Go to the beginning of line, then skip past the prompt, if any.
|
"Go to the beginning of line, then skip past the prompt, if any.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue