[Xfce4-commits] [apps/mousepad] 03/03: Reverse insertion and bounds iters for reverse search

noreply at xfce.org noreply at xfce.org
Sat Jul 12 22:02:46 CEST 2014


This is an automated email from the git hooks/post-receive script.

mbrush pushed a commit to branch master
in repository apps/mousepad.

commit 3e9cecc88a192938b398bf5801cef79f4c25e4f1
Author: Matthew Brush <mbrush at codebrainz.ca>
Date:   Sat Jul 12 12:57:08 2014 -0700

    Reverse insertion and bounds iters for reverse search
    
    This makes it so when searching backwards, the statusbar reports the
    correct start position of the selection.
---
 mousepad/mousepad-util.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/mousepad/mousepad-util.c b/mousepad/mousepad-util.c
index 2500a63..c57ce71 100644
--- a/mousepad/mousepad-util.c
+++ b/mousepad/mousepad-util.c
@@ -981,7 +981,10 @@ mousepad_util_search (GtkTextBuffer       *buffer,
           if (flags & MOUSEPAD_SEARCH_FLAGS_ACTION_SELECT)
             {
               /* select the match */
-              gtk_text_buffer_select_range (buffer, &match_start, &match_end);
+              if (! search_backwards)
+                gtk_text_buffer_select_range (buffer, &match_start, &match_end);
+              else
+                gtk_text_buffer_select_range (buffer, &match_end, &match_start);
             }
           else if (flags & MOUSEPAD_SEARCH_FLAGS_ACTION_REPLACE)
             {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list