aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2021-08-19 20:49:48 +0200
committerTeddy Wing2021-08-19 20:49:48 +0200
commitb0d5568c7c9546945471c9b95857f6666411ad87 (patch)
tree1b122278ba26ef800867653c1746ff43d24bd73f
parent79513cbf26a436a5a62fe6f88cfa768001756549 (diff)
downloadreadline-incdec-b0d5568c7c9546945471c9b95857f6666411ad87.tar.bz2
incdec: Fix backwards point at end of line case
Update the condition that increments the last number if the point is at the end.
-rw-r--r--incdec.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/incdec.pm b/incdec.pm
index 84990c0..9569171 100644
--- a/incdec.pm
+++ b/incdec.pm
@@ -33,7 +33,7 @@ sub incdec {
}
}
- if ($is_backward) {
+ if ($is_backward && $point_position == length $line) {
$start_position = $previous_match_start;
}