[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[5789] case-insensitivity in incremental search
From: |
Gavin D. Smith |
Subject: |
[5789] case-insensitivity in incremental search |
Date: |
Fri, 29 Aug 2014 23:26:38 +0000 |
Revision: 5789
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5789
Author: gavin
Date: 2014-08-29 23:26:35 +0000 (Fri, 29 Aug 2014)
Log Message:
-----------
case-insensitivity in incremental search
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/Makefile.am
trunk/info/session.c
trunk/info/t/infodir/intera.info
Added Paths:
-----------
trunk/info/t/inc-sea-insensitive.sh
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2014-08-29 11:40:28 UTC (rev 5788)
+++ trunk/ChangeLog 2014-08-29 23:26:35 UTC (rev 5789)
@@ -1,3 +1,9 @@
+2014-08-30 Gavin Smith <address@hidden>
+
+ * info/session.c (incremental_search): Go back to being
+ case-insensitive if all upper-case letters are deleted.
+ * info/t/inc-sea-insensitive.sh: New test.
+
2014-08-29 Gavin Smith <address@hidden>
* info/window.c (recalculate_line_starts, calculate_line_starts):
Modified: trunk/info/Makefile.am
===================================================================
--- trunk/info/Makefile.am 2014-08-29 11:40:28 UTC (rev 5788)
+++ trunk/info/Makefile.am 2014-08-29 23:26:35 UTC (rev 5789)
@@ -123,6 +123,7 @@
t/search-skip-screen.sh \
t/inc-sea-forward.sh \
t/inc-sea-forward-nonregex.sh \
+ t/inc-sea-insensitive.sh \
t/anchor-positions.sh \
t/quoted-label-as-target.sh \
t/quoted-target.sh \
Modified: trunk/info/session.c
===================================================================
--- trunk/info/session.c 2014-08-29 11:40:28 UTC (rev 5788)
+++ trunk/info/session.c 2014-08-29 23:26:35 UTC (rev 5789)
@@ -4182,7 +4182,7 @@
int last_search_result, search_result, dir;
SEARCH_STATE mystate, orig_state;
char *p;
- int case_sensitive = 0;
+ int case_sensitive;
long start_off = window->point;
long saved_point = window->point;
@@ -4392,8 +4392,9 @@
/* Search for the contents of isearch_string. */
show_isearch_prompt (dir, (unsigned char *) isearch_string,
search_result);
- /* If the search string includes upper-case letters, make the
- search case-sensitive. */
+ /* Make the search case-sensitive only if the search string includes
+ upper-case letters. */
+ case_sensitive = 0;
for (p = isearch_string; *p; p++)
if (isupper (*p))
{
Added: trunk/info/t/inc-sea-insensitive.sh
===================================================================
--- trunk/info/t/inc-sea-insensitive.sh (rev 0)
+++ trunk/info/t/inc-sea-insensitive.sh 2014-08-29 23:26:35 UTC (rev 5789)
@@ -0,0 +1,36 @@
+#!/bin/sh
+# Copyright (C) 2014 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+srcdir=${srcdir:-.}
+. $srcdir/t/Init-test.inc
+. $t/Init-inter.inc
+
+run_ginfo -f intera -n 'Incremental search case-insensitive'
+
+# Search for "match" with incremental search, adding an upper-case character
+# to make the search case-sensitive. Delete it and check the search goes back
+# to being case insensitive by checking that a "Match" is included.
+printf '\023matchX\010' >$PTY_TYPE
+printf '\023\023\r\rDq' >$PTY_TYPE
+
+. $t/Timeout-test.inc
+
+# Return non-zero (test failure) if files differ
+diff $GINFO_OUTPUT $t/node-target
+RETVAL=$?
+
+. $t/Cleanup.inc
+
Property changes on: trunk/info/t/inc-sea-insensitive.sh
___________________________________________________________________
Added: svn:executable
+ *
Modified: trunk/info/t/infodir/intera.info
===================================================================
(Binary files differ)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [5789] case-insensitivity in incremental search,
Gavin D. Smith <=