mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-08 13:19:36 +00:00
Fix comint-get-old-input-default for output field case (Bug#25028)
* lisp/comint.el (comint-get-old-input-default): Don't return whole field when point was on an output field.
This commit is contained in:
parent
26819cd1c0
commit
55c9bb9f3c
1 changed files with 5 additions and 3 deletions
|
@ -2248,14 +2248,16 @@ current line, if point is on an output field.
|
|||
If `comint-use-prompt-regexp' is non-nil, then return
|
||||
the current line with any initial string matching the regexp
|
||||
`comint-prompt-regexp' removed."
|
||||
(let (bof)
|
||||
(let (field-prop bof)
|
||||
(if (and (not comint-use-prompt-regexp)
|
||||
;; Make sure we're in an input rather than output field.
|
||||
(null (get-char-property (setq bof (field-beginning)) 'field)))
|
||||
(not (setq field-prop (get-char-property
|
||||
(setq bof (field-beginning)) 'field))))
|
||||
(field-string-no-properties bof)
|
||||
(comint-bol)
|
||||
(buffer-substring-no-properties (point)
|
||||
(if comint-use-prompt-regexp
|
||||
(if (or comint-use-prompt-regexp
|
||||
(eq field-prop 'output))
|
||||
(line-end-position)
|
||||
(field-end))))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue