aboutsummaryrefslogtreecommitdiffstats
path: root/incdec.pm
diff options
context:
space:
mode:
authorTeddy Wing2021-08-22 21:16:42 +0200
committerTeddy Wing2021-08-22 21:16:42 +0200
commit392554df943a23099d788d0f04e1cf13b66e910f (patch)
treedc17f373001ab433b3c31e019b6ef315926cf509 /incdec.pm
parent250252e775486f9d60652a4b4490caac6756e767 (diff)
downloadreadline-incdec-392554df943a23099d788d0f04e1cf13b66e910f.tar.bz2
incdec: Move point if negative hyphen is added or removed
Previously, point would stay in the same position, causing it to look like it moved when incrementing or decrementing between a negative number and a positive number. This moves point by one to the right when decrementing to a negative integer, or by one to the left when incrementing to a positive integer. That makes the point seem like it hasn't moved and making it look more natural. For example, now point behaves like this: $ test 12 0 ^ _decrement_ $ test 12 -1 ^ $ test 12 -1 ^ _increment_ $ test 12 0 ^ Before, it would do: $ test 12 0 ^ _decrement_ $ test 12 -1 ^ $ test 12 -1 ^ _increment_ $ test 12 0 ^
Diffstat (limited to 'incdec.pm')
0 files changed, 0 insertions, 0 deletions