[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[5738] incremental_search
From: |
Gavin D. Smith |
Subject: |
[5738] incremental_search |
Date: |
Fri, 08 Aug 2014 12:48:31 +0000 |
Revision: 5738
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5738
Author: gavin
Date: 2014-08-08 12:48:30 +0000 (Fri, 08 Aug 2014)
Log Message:
-----------
incremental_search
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/session.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2014-08-08 12:22:09 UTC (rev 5737)
+++ trunk/ChangeLog 2014-08-08 12:48:30 UTC (rev 5738)
@@ -1,5 +1,10 @@
2014-08-08 Gavin Smith <address@hidden>
+ * info/session.c (incremental_search): Code after 'after_search' label
+ moved to start of loop.
+
+2014-08-08 Gavin Smith <address@hidden>
+
* info/session.c (match_in_match_list, info_search_1)
(incremental_search)
Consistently name 'resbnd' arguments and local variables which are
Modified: trunk/info/session.c
===================================================================
--- trunk/info/session.c 2014-08-08 12:22:09 UTC (rev 5737)
+++ trunk/info/session.c 2014-08-08 12:48:30 UTC (rev 5738)
@@ -4219,7 +4219,7 @@
else
dir = 1;
- last_search_result = search_result = 0;
+ last_search_result = search_result = 1;
window_get_state (window, &orig_state);
@@ -4227,9 +4227,7 @@
if (!isearch_string_size)
isearch_string = xmalloc (isearch_string_size = 50);
- /* Show the search string in the echo area. */
isearch_string[isearch_string_index] = '\0';
- show_isearch_prompt (dir, (unsigned char *) isearch_string, search_result);
isearch_is_active = 1;
@@ -4238,6 +4236,25 @@
VFunction *func = NULL;
int quoted = 0;
+ /* Show the search string in the echo area. */
+ show_isearch_prompt (dir, (unsigned char *) isearch_string,
+ search_result);
+
+ if (search_result == 0)
+ {
+ if ((mystate.node == window->node) &&
+ (mystate.pagetop != window->pagetop))
+ {
+ int newtop = window->pagetop;
+ window->pagetop = mystate.pagetop;
+ set_window_pagetop (window, newtop);
+ }
+ display_update_one_window (window);
+ display_cursor_at_point (window);
+ }
+
+ last_search_result = search_result;
+
/* If a recent display was interrupted, then do the redisplay now if
it is convenient. */
if (!info_any_buffered_input_p () && display_was_interrupted_p)
@@ -4260,12 +4277,10 @@
}
else
{
- pop_isearch
- (window, &isearch_string_index, &dir, &search_result);
+ pop_isearch (window, &isearch_string_index,
+ &dir, &search_result);
isearch_string[isearch_string_index] = '\0';
- show_isearch_prompt (dir, (unsigned char *) isearch_string,
- search_result);
- goto after_search;
+ continue;
}
}
else if (key == Control ('q'))
@@ -4453,24 +4468,6 @@
then ring the terminal bell. */
if (search_result != 0 && last_search_result == 0)
terminal_ring_bell ();
-
- after_search:
- show_isearch_prompt (dir, (unsigned char *) isearch_string,
search_result);
-
- if (search_result == 0)
- {
- if ((mystate.node == window->node) &&
- (mystate.pagetop != window->pagetop))
- {
- int newtop = window->pagetop;
- window->pagetop = mystate.pagetop;
- set_window_pagetop (window, newtop);
- }
- display_update_one_window (window);
- display_cursor_at_point (window);
- }
-
- last_search_result = search_result;
}
/* Free the memory used to remember each search state. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [5738] incremental_search,
Gavin D. Smith <=