]> git.mdlowis.com Git - projs/tide.git/commitdiff
searching should only change focus and warp pointer when a match is found
authorMichael D. Lowis <mike.lowis@gentex.com>
Fri, 17 Mar 2017 16:25:26 +0000 (12:25 -0400)
committerMichael D. Lowis <mike.lowis@gentex.com>
Fri, 17 Mar 2017 16:25:26 +0000 (12:25 -0400)
xedit.c

diff --git a/xedit.c b/xedit.c
index c0cb86d5f63bc0ded179853b29c0266e92649d3a..cca5d1d96e3a441d5983e56f442d1ebb0eb311e1 100644 (file)
--- a/xedit.c
+++ b/xedit.c
@@ -303,8 +303,10 @@ static void search(void) {
     view_findstr(win_view(EDIT), SearchDir, str);
     free(SearchTerm);
     SearchTerm = str;
-    win_setregion(EDIT);
-    win_warpptr(EDIT);
+    if (view_selsize(win_view(EDIT))) {
+        win_setregion(EDIT);
+        win_warpptr(EDIT);
+    }
 }
 
 static void execute(void) {