[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[5736] avoid having multiple completion nodes in history
From: |
Gavin D. Smith |
Subject: |
[5736] avoid having multiple completion nodes in history |
Date: |
Fri, 08 Aug 2014 10:45:20 +0000 |
Revision: 5736
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5736
Author: gavin
Date: 2014-08-08 10:45:18 +0000 (Fri, 08 Aug 2014)
Log Message:
-----------
avoid having multiple completion nodes in history
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/echo-area.c
trunk/info/session.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2014-08-08 09:46:06 UTC (rev 5735)
+++ trunk/ChangeLog 2014-08-08 10:45:18 UTC (rev 5736)
@@ -5,6 +5,12 @@
* info/info.c (info_short_help): Say to show key bindings with "H"
instead of "h".
+ * info/session.c (forget_node): Permit removing last node from window.
+ (info_history_node): Check we are not removing the last node, and
+ display an error message if that is the case.
+ * info/echo-area.c (ea_possible_completions): Remove completion nodes
+ from window history.
+
2014-08-08 Gavin Smith <address@hidden>
* info/search.c (regexp_expand_newlines_and_tabs): Split out from
Modified: trunk/info/echo-area.c
===================================================================
--- trunk/info/echo-area.c 2014-08-08 09:46:06 UTC (rev 5735)
+++ trunk/info/echo-area.c 2014-08-08 10:45:18 UTC (rev 5736)
@@ -1070,9 +1070,14 @@
compwin = calling_window;
}
- if (compwin->node != possible_completions_output_node)
- info_set_node_of_window (compwin, possible_completions_output_node);
+ /* Clear any completion nodes already showing from the window history.
+ This could happen if the user presses TAB more than once. */
+ while (compwin->node && (compwin->node->flags & N_IsInternal)
+ && !strcmp (compwin->node->nodename, compwin_name))
+ forget_node (compwin);
+ info_set_node_of_window (compwin, possible_completions_output_node);
+
display_update_display ();
}
}
Modified: trunk/info/session.c
===================================================================
--- trunk/info/session.c 2014-08-08 09:46:06 UTC (rev 5735)
+++ trunk/info/session.c 2014-08-08 10:45:18 UTC (rev 5736)
@@ -756,7 +756,7 @@
forget_node (WINDOW *win)
{
int i = win->hist_index;
- if (i == 1)
+ if (i == 0)
return;
free_history_node (win->hist[i - 1]->node);
@@ -764,6 +764,12 @@
win->hist[i - 1] = 0;
i = --win->hist_index;
+ if (i == 0)
+ {
+ win->node = 0;
+ return; /* Window history is empty. */
+ }
+
window_set_node_of_window (win, win->hist[i - 1]->node);
if (auto_footnotes_p)
info_get_or_remove_footnotes (win);
@@ -3148,7 +3154,10 @@
DECLARE_INFO_COMMAND (info_history_node,
_("Select the most recently selected node"))
{
- forget_node (window);
+ if (window->hist_index > 1)
+ forget_node (window);
+ else
+ info_error (_("No earlier node in history"));
}
/* Read the name of a file and select the entire file. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [5736] avoid having multiple completion nodes in history,
Gavin D. Smith <=