[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[6106] fix display after backspacing to failing incremental search state
From: |
Gavin D. Smith |
Subject: |
[6106] fix display after backspacing to failing incremental search state |
Date: |
Sat, 07 Feb 2015 11:21:33 +0000 |
Revision: 6106
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6106
Author: gavin
Date: 2015-02-07 11:21:33 +0000 (Sat, 07 Feb 2015)
Log Message:
-----------
fix display after backspacing to failing incremental search state
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/session.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2015-02-07 10:52:18 UTC (rev 6105)
+++ trunk/ChangeLog 2015-02-07 11:21:33 UTC (rev 6106)
@@ -5,6 +5,11 @@
a shorter search string was not found. Report from Werner
Lemberg.
+ * info/session.c (window_set_state, window_get_state): Save
+ point of window so we know where to position cursor when we go
+ back to a failing search. Call display_update_one_window when
+ going back to a failing search.
+
2015-02-06 Karl Berry <address@hidden>
* texindex/Makefile.am (ti.info, ti.html): let's generate files by
Modified: trunk/info/session.c
===================================================================
--- trunk/info/session.c 2015-02-07 10:52:18 UTC (rev 6105)
+++ trunk/info/session.c 2015-02-07 11:21:33 UTC (rev 6106)
@@ -4313,6 +4313,7 @@
typedef struct {
NODE *node; /* The node displayed in this window. */
long pagetop; /* LINE_STARTS[PAGETOP] is first line in WINDOW. */
+ long point; /* Point in window. */
long start; /* Offset in node contents where search started. */
int search_index; /* Offset of the last char in the search string. */
int direction; /* The direction that this search is heading in. */
@@ -4339,6 +4340,7 @@
{
state->node = window->node;
state->pagetop = window->pagetop;
+ state->point = window->point;
}
/* Set the node, pagetop, and point of WINDOW. */
@@ -4348,6 +4350,7 @@
if (window->node != state->node)
window_set_node_of_window (window, state->node);
window->pagetop = state->pagetop;
+ window->point = state->point;
}
/* Push the state of this search. */
@@ -4470,8 +4473,6 @@
long start_off = window->point;
int starting_history_entry = window->hist_index - 1;
- long saved_point = window->point;
-
if (count < 0)
dir = -1;
else
@@ -4623,12 +4624,14 @@
/* Don't search for an empty string. Clear the search. */
free (window->matches);
window->matches = 0;
- window->point = saved_point;
display_update_one_window (window);
continue;
}
if (search_result != search_success)
- continue;
+ {
+ display_update_one_window (window);
+ continue;
+ }
}
}
else if (func == &isearch_forward || func == &isearch_backward)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [6106] fix display after backspacing to failing incremental search state,
Gavin D. Smith <=