Open maximbaz opened 9 years ago
I think I've implemented this in the padding-tests branch of my fork. It has evil-numbers/inc-at-pt-pad
and evil-numbers/dec-at-pt-pad
that preserve padding (consistently for negatives too, I think), where the original functions do not preserve it.
I'm pretty sure it still has some kinks to work out, though.
Edit: pulled into master of my fork, for now. I think most if not all of the "kinks" were present even before my changes.
@cofi, out of curiosity, what was the rationale behind this decision?
I'm sure there are pros and cons in both approaches, and padding doesn't always suit as well (see @mlf176f2's PR for just one of many examples).
I think it makes sense to have 2 pairs of commands, one shall pad with zeros, another shall not. And no need to implement fancy rules to determine, when to use padding.
P.S. This may be better discussed in a separate thread, but currently padding works only for positive numbers, e.g. decrement from
10
gives09
, while increment from-10
gives-9
.