From: Michael D. Lowis Date: Fri, 17 Mar 2017 16:25:26 +0000 (-0400) Subject: searching should only change focus and warp pointer when a match is found X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=f6a984592301e52284756f573494ffb5ef84b097;p=projs%2Ftide.git searching should only change focus and warp pointer when a match is found --- diff --git a/xedit.c b/xedit.c index c0cb86d..cca5d1d 100644 --- 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) {