]> code.delx.au - gnu-emacs/commitdiff
More fixes to support multi-line search in comint
authorJuri Linkov <juri@linkov.net>
Mon, 29 Dec 2014 00:52:38 +0000 (02:52 +0200)
committerJoão Távora <joaotavora@gmail.com>
Tue, 13 Jan 2015 07:39:23 +0000 (07:39 +0000)
* 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.

[backport from trunk]

lisp/ChangeLog
lisp/comint.el

index ff384a4c14dc036bb7b98d5089450bed5a97bcef..fb8dfba05d5640cea7138a4081dfbd4c7f5b3004 100644 (file)
@@ -6,6 +6,12 @@
        (comint-send-input): Go to the end of the field instead of the end
        of the line to accept whole multi-line input.
        http://lists.gnu.org/archive/html/emacs-devel/2014-12/msg00305.html
+       (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.
+
+       [Backport]
 
 2015-01-09  Eli Zaretskii  <eliz@gnu.org>
 
index cd6ecb4c2f14c80bc5a12d5b41861c9242a39d30..f33034bdb57f12b9549d9e73fffc03d7d4a5a829 100644 (file)
@@ -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))