branch: externals/coterm commit 96a636e3c745941e9eb5dce5247c57750609a121 Author: m <> Commit: m <>
Protect user input at EOB more accurately --- coterm.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/coterm.el b/coterm.el index 6600acf..d1ead36 100644 --- a/coterm.el +++ b/coterm.el @@ -438,12 +438,12 @@ only leave these modes once cursor moves to the bottom line." If there is no user input at end of buffer, simply widen. PMARK is the process mark." (widen) - (unless (eq (get-char-property (max 1 (1- (point-max))) 'field) - 'output) - (goto-char (point-max)) - (text-property-search-backward 'field 'output) - (when (<= pmark (point)) - (narrow-to-region (point-min) (point))))) + (unless comint-use-prompt-regexp + (unless (eq (get-char-property (max 1 (1- (point-max))) 'field) + 'output) + (goto-char (point-max)) + (text-property-search-backward 'field 'output) + (narrow-to-region (point-min) (max pmark (point)))))) ;;; Terminal emulation