]> git.wh0rd.org Git - nano.git/commitdiff
in do_replace_loop(), simplify the display_string() call that we use to
authorDavid Lawrence Ramsey <pooka109@gmail.com>
Mon, 13 Jun 2005 03:19:50 +0000 (03:19 +0000)
committerDavid Lawrence Ramsey <pooka109@gmail.com>
Mon, 13 Jun 2005 03:19:50 +0000 (03:19 +0000)
get the word that we're going to highlight

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2642 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
src/search.c

index 6ec79fbb56fa91b3d8df3c9d293e084f7219a25a..58910674ebe4cf501b0827b189070615c647ce07 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -191,6 +191,8 @@ CVS code -
          work properly when we've replaced one or more instances of a
          string in copy and haven't yet updated current->data to match
          copy. (DLR)
+       - Simplify the display_string() call that we use to get the word
+         that we're going to highlight. (DLR)
 - utils.c:
   num_of_digits()
        - Use a size_t instead of an int, and rename to digits(). (DLR)
index e739e9976efa4d5bea61be8a49a52a93856c3af1..c032f834916805daafc0954f914a69720bad35cb 100644 (file)
@@ -754,8 +754,7 @@ ssize_t do_replace_loop(const char *needle, const filestruct
            char *exp_word;
            size_t xpt = xplustabs();
 
-           exp_word = display_string(current->data, xpt,
-               strnlenpt(current->data, match_len + current_x) - xpt,
+           exp_word = display_string(current->data, xpt, match_len,
                FALSE);
 
            curs_set(0);