vscode-string-manipulation icon indicating copy to clipboard operation
vscode-string-manipulation copied to clipboard

Incrementing floating point numbers not working correctly

Open MohammadMD1383 opened this issue 3 years ago • 5 comments

when selecting a floating point number and run the command increment it behaves wrong:

before:

1.2

after:

2.3

MohammadMD1383 avatar Jun 14 '21 13:06 MohammadMD1383

It's intent is do increment whole numbers which is why it's incrementing each one. But this feature request is reasonable.

You'd expect 1.2 to become 2.2 correct?

On Mon, Jun 14, 2021, 8:00 AM Mohammad Mostafa @.***> wrote:

when selecting this piece of code and run the command increment it behaves wrong:

before:

1.2

after:

2.3

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/marclipovsky/vscode-string-manipulation/issues/29, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA3OZG3CI76AGPLQXZQHUTTSX4PBANCNFSM46VF77OQ .

marclipovsky avatar Jun 14 '21 13:06 marclipovsky

You'd expect 1.2 to become 2.2 correct?

I think it should increment by the smallest value. (sorry if I made a mistake due to poor English) I mean 2.2 -> 2.3 and 1.235 -> 1.236

MohammadMD1383 avatar Jun 15 '21 05:06 MohammadMD1383

Or even you can add some options to let the user choice how incrementing is done.

MohammadMD1383 avatar Jun 15 '21 09:06 MohammadMD1383

Maybe I'll add "increment decimal" or something.

On Tue, Jun 15, 2021, 4:04 AM Mohammad Mostafa @.***> wrote:

Or even you can add some options to let the user choice how incrementing is done.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/marclipovsky/vscode-string-manipulation/issues/29#issuecomment-861324929, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA3OZFMZBYLITY4Z7V5FATTS4JTTANCNFSM46VF77OQ .

marclipovsky avatar Jun 15 '21 13:06 marclipovsky

@MohammadMD1383 I'll resolve this week

marclipovsky avatar Apr 12 '23 00:04 marclipovsky