Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Extra space inserted when inserting hexadecimal numbers with Column Editor #15168

Closed
1 task done
cddiffz opened this issue May 21, 2024 · 10 comments
Closed
1 task done
Assignees

Comments

@cddiffz
Copy link
Contributor

cddiffz commented May 21, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Description of the Issue

Sometimes, when inserting hexadecimal numbers with Column Editor, an extra space is inserted.

Steps To Reproduce

  1. Type "ab" and place the cursor between the letters
  2. Open Column Editor, select "Number to Insert", set "Initial number" to 0, "Leading" to "None", and "Format" to "Hex"
  3. Press "OK"

Current Behavior

You get "a0 b".

Expected Behavior

You get "a0b".

Debug Information

Notepad++ v8.6.7   (64-bit)
Build time : May 12 2024 - 20:04:00
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line :
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
Periodic Backup : ON
OS Name : Windows 10 Pro (64-bit)
OS Version : 1809
OS Build : 17763.1579
Current ANSI codepage : 1252
Plugins :
    mimeTools (3.1)
    NppConverter (4.6)
    NppExport (0.4)

Anything else?

No response

@alankilborn
Copy link
Contributor

OK, but how about providing a USEFUL use case.
No one is going to use Column Editor to insert a single number.

@cddiffz
Copy link
Contributor Author

cddiffz commented May 21, 2024

Are you serious? This is a minimal example.

@donho
Copy link
Member

donho commented May 21, 2024

Hmm... I can reproduce with several lines:

image

@donho donho self-assigned this May 21, 2024
@donho
Copy link
Member

donho commented May 21, 2024

@cddiffz
I can assign this issue to you if you want to provide a PR.
Otherwise, I'll fix it.

@cddiffz
Copy link
Contributor Author

cddiffz commented May 21, 2024

Please assign it to me.

@donho
Copy link
Member

donho commented May 21, 2024

Hmm... after playing around, here's the result:

image

The first column with "leading zero" and the 2nd column with "None".

So what I have said is not wrong:
#15152 (comment)

However, I believe that if Hex is selected, "leading zero" should be forced chosen. What do you guys think?

@donho donho assigned cddiffz and unassigned donho May 21, 2024
@cddiffz
Copy link
Contributor Author

cddiffz commented May 21, 2024

I would let the user decide and treat all number systems equally.

@donho
Copy link
Member

donho commented May 21, 2024

@cddiffz

I would let the user decide and treat all number systems equally.

In this case, what's the correct result of the 2nd column (with "None") for you?

@cddiffz
Copy link
Contributor Author

cddiffz commented May 21, 2024

aFE b
aFF b
a100b

a110b

@donho
Copy link
Member

donho commented May 21, 2024

aFE b
aFF b
a100b
…
a110b

OK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants