-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Add option to include C0 and C1 characters to menu item Show NPC #13324
Conversation
@alankilborn @Gitoffthelawn |
@alankilborn I am currently away so I won't be able to fix it soon. |
It could be related to changing encodings but at the time of the screenshot above, encoding was UTF-8 (sorry, did not have status bar in the screenshot). Also, would it be possible to change the text from |
@alankilborn In unicode they are called cc, but I can change it to |
@ozone10 But let's talk about the scope and terms firstly: |
@donho About checkbox, personally I prefer that C0/C1 codes to be shown regardless of state of "Show NPC" menu item, but some users might want to have them hidden, they want some kind of "reader mode". |
OK, in this case, is it better to use the term more generic "Control characters" instead of "C0 & C1" which is obscure for the most of users (it's obscure even to me)?
Agree. I think it's good to provide an option to hide those characters and it's better to show them by default - that's the point of eventual confusion brought by new GUI I mentioned above: |
@donho To reuse same settings as current NPC (appearence), I didn't create separate command. Currently I have only fixed issue with npc state unsync when changing encodings. If you still want to separate them to two commands, then maybe next week I will look into it. Or if you want to implement it self, feel free, it should just require to duplicate current npc implementation with little tweaks. |
Thank you for your work. 👍 Could you please list the exact STR 52366d0 should fix? Copy & paste the following text in a UTF-8 file.
Convert to ANSI. Copy & paste the following text in a UTF-8 file.
Switch to another tab. |
|
It should fix this. for #11430 no. Commit 52366d0 fix only npc representation unsync with menu item "Show Non-printing Characters" when changing encoding, as changing encoding could reset representation resulting in #13324 (comment) PR does not touch data, only their appearance. |
This is still reproducible with the latest commit.
After realizing it was caused by 11430, I understood it had nothing to do NPC.
Should I be able to reproduce the "npc representation unsync with menu" case with the current master? Thank you. |
You've deleted some lines from your original reply. :) Thank you. |
👍 |
There's still a problem with one-line. Uncheck Result: |
@Yaron10 commit 4976979 takes advantage of function (which is applied after "show npc" function) which has redraw property, so it fixed issue when changing tabs.
But here there is no such function to use. |
Thank you for the explanation. 👍 The best applications have some "known-issues". |
I'm not sure it's worth it, but wrapping/unwrapping solves the issue. notepad-plus-plus/PowerEditor/src/NppCommands.cpp Line 3666 in 816fa3e
|
Thank you for the nice fix. 👍 Unfortunately, I've just noticed that the problem might occur even if the file contains more than one line. Result (reproducible 9 out of 10 times): How about using |
Great. 👍 |
@ozone10 OK, I will do my version by inspiring your PR. Thank you for your coding effort. |
@donho But as I said I am currently busy, so feel free to do necessary modifications. |
Excuse me, but I have questions about the feature:
|
af38664
to
e9ebdab
Compare
@ozone10 |
@donho
|
separate unicode EOL from main NPC list add additional characters to main NPC list
instead of Include C0, C1 and Unicode EOL menu
3 quick questions/remarks: BEFORE RENDERING AFTER RENDERING Is it intentional? If yes, why?
For me, it's even more confusing. The "non rendered" looks like
|
@ozone10 |
@donho
Currently "Show C0, C1 ..." is fully separated from "Show All" command
I used term "render" to distinguish it more from other "show" command, IIRC it is used in some other text editors.
There is also tooltip for it, but do you have better wording or idea for it
Using warning should be better👍. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please consider the GUI suggestions and modify concerning data
@@ -673,6 +673,8 @@ BEGIN | |||
MENUITEM "Show Non-Printing Characters", IDM_VIEW_NPC | |||
MENUITEM "Show All Characters", IDM_VIEW_ALL_CHARACTERS | |||
MENUITEM SEPARATOR | |||
MENUITEM "Show C0, C1 Control and Unicode EOL Characters", IDM_VIEW_NPC_CCUNIEOL | |||
MENUITEM SEPARATOR | |||
MENUITEM "Show Indent Guide", IDM_VIEW_INDENT_GUIDE | |||
MENUITEM "Show Wrap Symbol", IDM_VIEW_WRAP_SYMBOL | |||
END |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do the following instead:
BEGIN
MENUITEM "Show Space and Tab", IDM_VIEW_TAB_SPACE
MENUITEM "Show End of Line", IDM_VIEW_EOL
MENUITEM "Show Non-Printing Characters", IDM_VIEW_NPC
MENUITEM "Show Control Characters && Unicode EOL", IDM_VIEW_NPC_CCUNIEOL
MENUITEM "Show All Characters", IDM_VIEW_ALL_CHARACTERS
MENUITEM SEPARATOR
MENUITEM "Show Indent Guide", IDM_VIEW_INDENT_GUIDE
MENUITEM "Show Wrap Symbol", IDM_VIEW_WRAP_SYMBOL
END
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@donho
currently it is not part of "Show All Characters" won't it causes confusion if it is next to "Show All Characters" and not separated. Or should I include it in "Show All Characters".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ozone10
If "Show All Characters" shows NPC, I don't see why it doesn't show Control Characters & Unicode EOL.
So please include c0, c1 & Unicode EOL in "Show All Characters".
PUSHBUTTON "?",IDC_BUTTON_NPC_NOTE,141,14,16,14,NOT WS_TABSTOP | ||
CONTROL "Abbreviation",IDC_RADIO_NPC_ABBREVIATION,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP | WS_GROUP,17,16,110,10 | ||
CONTROL "Codepoint",IDC_RADIO_NPC_CODEPOINT,"Button",BS_AUTORADIOBUTTON,17,31,110,10 | ||
CONTROL "Custom Color",IDC_CHECK_NPC_COLOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,47,110,10 | ||
PUSHBUTTON "...",IDC_BUTTON_NPC_LAUNCHSTYLECONF,141,44,16,14 | ||
CONTROL "Apply to C0, C1 and Unicode EOL",IDC_CHECK_NPC_INCLUDECCUNIEOL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,62,140,10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do the following instead:
CONTROL "Apply to C0, C1 && Unicode EOL",IDC_CHECK_NPC_INCLUDECCUNIEOL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,62,140,10
separate unicode EOL from main NPC list
add additional characters to main NPC list
fix #8111