From: Juri Linkov Date: Mon, 29 Dec 2014 00:52:38 +0000 (+0200) Subject: More fixes to support multi-line search in comint X-Git-Tag: emacs-25.0.90~2631^2~12^2~5 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a0ae3d7331f6126941f90c6b80c293685004e165;p=emacs.git More fixes to support multi-line search in comint * lisp/comint.el (comint-history-isearch-message): Use field-beginning instead of comint-line-beginning-position - that's more fixes for http://lists.gnu.org/archive/html/emacs-devel/2014-12/msg00305.html (comint-history-isearch-message): Fix args of isearch-message-prefix. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6982ee9a3dd..37f3892e2cb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2014-12-29 Juri Linkov + + * comint.el (comint-history-isearch-message): Use field-beginning + instead of comint-line-beginning-position - that's more fixes for + http://lists.gnu.org/archive/html/emacs-devel/2014-12/msg00305.html + (comint-history-isearch-message): Fix args of isearch-message-prefix. + 2014-12-29 Juri Linkov * vc/vc-dir.el (vc-dir-display-file): New command (bug#19450). diff --git a/lisp/comint.el b/lisp/comint.el index 3085052087c..4acaa30db91 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -1532,14 +1532,20 @@ the function `isearch-message'." ;; the initial comint prompt. (if (overlayp comint-history-isearch-message-overlay) (move-overlay comint-history-isearch-message-overlay - (save-excursion (forward-line 0) (point)) - (comint-line-beginning-position)) + (save-excursion + (goto-char (field-beginning)) + (forward-line 0) + (point)) + (field-beginning)) (setq comint-history-isearch-message-overlay - (make-overlay (save-excursion (forward-line 0) (point)) - (comint-line-beginning-position))) + (make-overlay (save-excursion + (goto-char (field-beginning)) + (forward-line 0) + (point)) + (field-beginning))) (overlay-put comint-history-isearch-message-overlay 'evaporate t)) (overlay-put comint-history-isearch-message-overlay - 'display (isearch-message-prefix c-q-hack ellipsis)) + 'display (isearch-message-prefix ellipsis isearch-nonincremental)) (if (and comint-input-ring-index (not ellipsis)) ;; Display the current history index. (message "History item: %d" (1+ comint-input-ring-index))