GNU bug report logs - #18131
24.4.50; View-search-... skips all matches between (point) and edge of window

Previous Next

Package: emacs;

Reported by: Dima Kogan <dima <at> secretsauce.net>

Date: Mon, 28 Jul 2014 18:08:01 UTC

Severity: minor

Tags: fixed, patch

Found in version 24.4.50

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 18131 <at> debbugs.gnu.org (full text, mbox):

From: Dima Kogan <dima <at> secretsauce.net>
To: 18131 <at> debbugs.gnu.org
Subject: patch update
Date: Mon, 28 Jul 2014 11:26:20 -0700
[Message part 1 (text/plain, inline)]
I jumped the gun with that patch a bit. Here's an updated version

[0001-View-search-.-now-hit-all-the-matches-regardless-of-.patch (text/x-diff, inline)]
From 5c300c00db8de26074b7b537e1cebde19a5574e7 Mon Sep 17 00:00:00 2001
From: Dima Kogan <dima <at> secretsauce.net>
Date: Mon, 28 Jul 2014 11:05:00 -0700
Subject: [PATCH] View-search-... now hit all the matches, regardless of window
 position

Prior to this patch anything between (point) and the edge of the window was
skipped. This was counterintuitive (not what less or vim do) and was not
mentioned in the documentation
---
 lisp/view.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/view.el b/lisp/view.el
index 9f914b0..698a73c 100644
--- a/lisp/view.el
+++ b/lisp/view.el
@@ -960,7 +960,7 @@ for highlighting the match that is found."
      (t (error "No previous View-mode search")))
     (save-excursion
       (if end (goto-char (if (< times 0) (point-max) (point-min)))
-	(move-to-window-line (if (< times 0) 0 -1)))
+	(forward-line (if (< times 0) -1 1)))
       (if (if no (view-search-no-match-lines times regexp)
 	    (re-search-forward regexp nil t times))
 	  (setq where (point))))
-- 
2.0.0


This bug report was last modified 5 years and 333 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.