aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--incdec.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/incdec.pm b/incdec.pm
index d2982c4..d4b1460 100644
--- a/incdec.pm
+++ b/incdec.pm
@@ -9,8 +9,9 @@ sub incdec {
$point_position ||= 0;
$is_backward ||= 0;
+ # If point is within a number, move it to ensure we match the whole number
+ # rather than only part of its digits.
$line =~ /(\d+)/;
-
if ($-[0] <= $point_position && $point_position < $+[0]) {
$point_position = $-[0];
}