diff options
| author | Teddy Wing | 2021-08-08 20:55:41 +0200 |
|---|---|---|
| committer | Teddy Wing | 2021-08-08 20:55:41 +0200 |
| commit | ccfbd51f1d4b39e5778fed6facf15c7815b2b6aa (patch) | |
| tree | 4e7b95de3bccd5474a54a859845de06f73e2a8e4 /incdec.pm | |
| parent | 3c499b509196b246be487700149295c9ccf2bee8 (diff) | |
| download | readline-incdec-ccfbd51f1d4b39e5778fed6facf15c7815b2b6aa.tar.bz2 | |
incdec: Describe the 'point within number' handling
Diffstat (limited to 'incdec.pm')
| -rw-r--r-- | incdec.pm | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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]; } |
