texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[7761] tree search adjust failure message


From: gavinsmith0123
Subject: [7761] tree search adjust failure message
Date: Thu, 27 Apr 2017 15:03:16 -0400 (EDT)

Revision: 7761
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7761
Author:   gavin
Date:     2017-04-27 15:03:15 -0400 (Thu, 27 Apr 2017)
Log Message:
-----------
tree search adjust failure message

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/info/session.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2017-04-27 18:06:21 UTC (rev 7760)
+++ trunk/ChangeLog     2017-04-27 19:03:15 UTC (rev 7761)
@@ -1,5 +1,12 @@
 2017-04-27  Gavin Smith  <address@hidden>
 
+       * info/session.c (tree_search_check_node)
+       (tree_search_check_node_backwards): Adjust failure message 
+       according to whether a search match was previously found.  
+       Suggestion by Benno Schulenberg.
+
+2017-04-27  Gavin Smith  <address@hidden>
+
        * info/display.c (display_process_line): Avoid possibly
        dereferencing a null pointer.  This could happen if the 
        'match-rendition' value was set to an empty value in .infokey.

Modified: trunk/info/session.c
===================================================================
--- trunk/info/session.c        2017-04-27 18:06:21 UTC (rev 7760)
+++ trunk/info/session.c        2017-04-27 19:03:15 UTC (rev 7761)
@@ -4432,7 +4432,7 @@
       window->point = window->node->body_start;
       tree_search_check_node_backwards (window);
     }
-  info_error (_("No more matches."));
+  info_error (previous_match ?  _("No more matches.") : _("Search failed."));
 
 funexit:
   free (string);
@@ -4446,7 +4446,10 @@
   long start_off;
   enum search_result result;
   char *string;
+  int previous_match;
 
+  previous_match = (window->node->active_menu != 0);
+
   string = xstrdup (window->search_string);
   goto check_node;
 
@@ -4542,7 +4545,7 @@
     }
 
   /* Otherwise, no result. */
-  info_error (_("No more matches."));
+  info_error (previous_match ?  _("No more matches.") : _("Search failed."));
 
 funexit:
   free (string);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]