[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[5850] empty string for index search
From: |
Gavin D. Smith |
Subject: |
[5850] empty string for index search |
Date: |
Mon, 29 Sep 2014 14:37:43 +0000 |
Revision: 5850
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5850
Author: gavin
Date: 2014-09-29 14:37:42 +0000 (Mon, 29 Sep 2014)
Log Message:
-----------
empty string for index search
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/indices.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2014-09-29 14:01:59 UTC (rev 5849)
+++ trunk/ChangeLog 2014-09-29 14:37:42 UTC (rev 5850)
@@ -30,6 +30,11 @@
(report_index_match): Don't internationalize a string that
should never be displayed.
+ * info/indices.c (info_indices_of_file_buffer): Check if we have
+ already built an index moved from next_index_match.
+ (info_index_search) <empty search string>: Call
+ info_indices_of_file_buffer. Always exit function.
+
2014-09-28 Gavin Smith <address@hidden>
* info/indices.c (info_index_apropos): Strip any suffix like
Modified: trunk/info/indices.c
===================================================================
--- trunk/info/indices.c 2014-09-29 14:01:59 UTC (rev 5849)
+++ trunk/info/indices.c 2014-09-29 14:37:42 UTC (rev 5850)
@@ -98,15 +98,26 @@
register int i;
REFERENCE **result = NULL;
- free (index_index);
-
/* No file buffer, no indices. */
if (!file_buffer)
{
+ free (index_index);
index_index = 0;
return;
}
+ /* If the file is the same as the one that we last built an
+ index for, don't do anything. */
+ if (initial_index_filename
+ && FILENAME_CMP (initial_index_filename, file_buffer->filename) == 0)
+ {
+ return;
+ }
+
+ /* Display a message because finding the index entries might take a while. */
+ if (info_windows_initialized_p)
+ window_message_in_echo_area (_("Finding index entries..."));
+
/* Reset globals describing where the index was found. */
free (initial_index_filename);
free (initial_index_nodename);
@@ -175,7 +186,11 @@
if (!result[i]->filename)
result[i]->filename = xstrdup (file_buffer->filename);
+ free (index_index);
index_index = result;
+
+ if (info_windows_initialized_p)
+ window_clear_echo_area ();
}
void info_next_index_match (WINDOW *window, int count, int key);
@@ -201,6 +216,7 @@
{
free (line);
+ info_indices_of_file_buffer (file_buffer_of_window (window));
if (initial_index_filename && initial_index_nodename)
{
NODE *node;
@@ -208,8 +224,8 @@
node = info_get_node (initial_index_filename,
initial_index_nodename);
info_set_node_of_window (window, node);
- return;
}
+ return;
}
fb = file_buffer_of_window (window);
@@ -294,17 +310,7 @@
partial_match = 0;
search_len = strlen (string);
- /* If the file is not the same as the one that we last built an
- index for, build and remember an index now. */
- if (!initial_index_filename
- || FILENAME_CMP (initial_index_filename, fb->filename) != 0)
- {
- if (info_windows_initialized_p)
- window_message_in_echo_area (_("Finding index entries..."));
- info_indices_of_file_buffer (fb); /* Sets index_index. */
- }
-
- /* If there is no index, quit now. */
+ info_indices_of_file_buffer (fb); /* Sets index_index. */
if (!index_index)
{
info_error (_("No indices found."));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [5850] empty string for index search,
Gavin D. Smith <=