emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/isearch.el


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/isearch.el
Date: Sat, 15 Dec 2001 22:56:40 -0500

Index: emacs/lisp/isearch.el
diff -c emacs/lisp/isearch.el:1.205 emacs/lisp/isearch.el:1.206
*** emacs/lisp/isearch.el:1.205 Sat Dec 15 22:53:15 2001
--- emacs/lisp/isearch.el       Sat Dec 15 22:56:40 2001
***************
*** 366,371 ****
--- 366,372 ----
  (defvar isearch-wrapped nil)  ; Searching restarted from the top (bottom).
  (defvar isearch-barrier 0)
  (defvar isearch-just-started nil)
+ (defvar isearch-start-hscroll 0)      ; hscroll when starting the search.
  
  ; case-fold-search while searching.
  ;   either nil, t, or 'yes.  'yes means the same as t except that mixed
***************
*** 557,562 ****
--- 558,564 ----
        isearch-other-end nil
        isearch-small-window nil
        isearch-just-started t
+       isearch-start-hscroll (window-hscroll)
  
        isearch-opoint (point)
        search-ring-yank-pointer nil
***************
*** 636,643 ****
                                               (window-hscroll))
                           (set-window-hscroll (selected-window) 0))
                  (other-window 1))
!               (goto-char found-point)))
!         (if isearch-other-end
              (if (< isearch-other-end (point)) ; isearch-forward?
                  (isearch-highlight isearch-other-end (point))
                (isearch-highlight (point) isearch-other-end))
--- 638,650 ----
                                               (window-hscroll))
                           (set-window-hscroll (selected-window) 0))
                  (other-window 1))
!               (goto-char found-point))
!         ;; Keep same hscrolling as at the start of the search when possible
!         (let ((current-scroll (window-hscroll)))
!           (set-window-hscroll (selected-window) isearch-start-hscroll)
!           (unless (pos-visible-in-window-p)
!             (set-window-hscroll (selected-window) current-scroll))))
!       (if isearch-other-end
              (if (< isearch-other-end (point)) ; isearch-forward?
                  (isearch-highlight isearch-other-end (point))
                (isearch-highlight (point) isearch-other-end))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]