[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[5746] incremental_search backspace display
From: |
Gavin D. Smith |
Subject: |
[5746] incremental_search backspace display |
Date: |
Sun, 10 Aug 2014 16:04:25 +0000 |
Revision: 5746
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5746
Author: gavin
Date: 2014-08-10 16:04:23 +0000 (Sun, 10 Aug 2014)
Log Message:
-----------
incremental_search backspace display
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/session.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2014-08-10 14:00:03 UTC (rev 5745)
+++ trunk/ChangeLog 2014-08-10 16:04:23 UTC (rev 5746)
@@ -1,5 +1,11 @@
2014-08-10 Gavin Smith <address@hidden>
+ * info/session.c (incremental_search): Backspace always deletes last
+ character in search pattern. Do search again to update displayed
+ highlights.
+
+2014-08-10 Gavin Smith <address@hidden>
+
* info/search.c (regexp_search): Arguments changed. Don't take
WINDOW argument.
* info/info-utils.c (scan_node_contents)
Modified: trunk/info/session.c
===================================================================
--- trunk/info/session.c 2014-08-10 14:00:03 UTC (rev 5745)
+++ trunk/info/session.c 2014-08-10 16:04:23 UTC (rev 5746)
@@ -4216,6 +4216,9 @@
isearch_is_active = 1;
+ /* Save starting position of search. */
+ push_isearch (window, isearch_string_index, dir, search_result);
+
while (isearch_is_active)
{
VFunction *func = NULL;
@@ -4253,6 +4256,24 @@
key = get_input_key ();
window_get_state (window, &mystate);
+ if (key == Control ('q'))
+ {
+ /* User wants to insert a character. */
+ key = get_input_key ();
+ if (key < 0 || key >= 256)
+ continue; /* The user pressed a key like an arrow key. */
+ quoted = 1;
+ }
+ else
+ {
+ /* If this key is not a keymap, get its associated function,
+ if any. */
+ type = info_keymap[key].type;
+ func = type == ISFUNC
+ ? InfoFunction(info_keymap[key].function)
+ : NULL; /* function member is a Keymap if ISKMAP */
+ }
+
if (key == DEL || key == Control ('h'))
{
/* User wants to delete one level of search? */
@@ -4266,34 +4287,15 @@
pop_isearch (window, &isearch_string_index,
&dir, &search_result);
isearch_string[isearch_string_index] = '\0';
- continue;
+ if (isearch_string_index == 0)
+ continue; /* Don't search for an empty string. */
}
}
- else if (key == Control ('q'))
+ else if (quoted || (key >= 32 && key < 256
+ && (isprint (key) || (type == ISFUNC && func == NULL))))
{
- /* User wants to insert a character. */
- key = get_input_key ();
- if (key < 0 || key >= 256)
- continue; /* The user pressed a key like an arrow key. */
- quoted = 1;
- }
+ push_isearch (window, isearch_string_index, dir, search_result);
- /* If this key is not a keymap, get its associated function,
- if any. */
- if (!quoted)
- {
- type = info_keymap[key].type;
- func = type == ISFUNC
- ? InfoFunction(info_keymap[key].function)
- : NULL; /* function member is a Keymap if ISKMAP */
- }
-
- /* We are about to search again, or quit. Save the current search. */
- push_isearch (window, isearch_string_index, dir, search_result);
-
- if (quoted || (key >= 32 && key < 256
- && (isprint (key) || (type == ISFUNC && func == NULL))))
- {
if (isearch_string_index + 2 >= isearch_string_size)
isearch_string = xrealloc
(isearch_string, isearch_string_size += 100);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [5746] incremental_search backspace display,
Gavin D. Smith <=