summaryrefslogtreecommitdiff
path: root/src/search.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/search.c')
-rw-r--r--src/search.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/search.c b/src/search.c
index aa16d4484..920c68c5a 100644
--- a/src/search.c
+++ b/src/search.c
@@ -2145,6 +2145,8 @@ findmatchlimit(
else if (initc != '#' && initc != NUL)
{
find_mps_values(&initc, &findc, &backwards, TRUE);
+ if (dir)
+ backwards = (dir == FORWARD) ? FALSE : TRUE;
if (findc == NUL)
return NULL;
}