diff options
| author | Teddy Wing | 2021-08-22 21:16:42 +0200 |
|---|---|---|
| committer | Teddy Wing | 2021-08-22 21:16:42 +0200 |
| commit | 392554df943a23099d788d0f04e1cf13b66e910f (patch) | |
| tree | dc17f373001ab433b3c31e019b6ef315926cf509 /incdec.pm | |
| parent | 250252e775486f9d60652a4b4490caac6756e767 (diff) | |
| download | readline-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
