francostellari / NppPlugins

Other
105 stars 6 forks source link

[BUGS: MenuIcons] 1. Add a Symbol (file needs saving) Doesn't Always Display + 2. Symbol Change Adds Another 3. Unicode Issue #33

Closed dbareis closed 1 year ago

dbareis commented 1 year ago

To reproduce:

Possibly 3rd bug: I realised when typing the above that I could add my own "icon" by unicode, that works for some but wider character such as '💥' are ignored, and in any case they don't display in color when they are.

dbareis commented 1 year ago

Oh well, unicode works until you restart npp....

francostellari commented 1 year ago

Thank you for the comments 1) I see the raname issue, it reappeared after I simplified the code before the release. 2) is not a bug, the options dialog box clearly states that you need to restart 3) I have no idea why some unicode characters do not work, perhaps they are more than 1 TCHAR Please note that I'm currently not planning to fix any of them. So far I only received a bunch of complaints from people that do not like the icons on the tabs or have plenty of ideas on how it should be working... and they don't care of disabling the unwanted feature. If anything it will simply ship with the feature disabled by default.

On Fri, Oct 28, 2022 at 11:40 PM dbareis @.***> wrote:

To reproduce:

  • Set the option to display a symbol (it would be nice if this could be more than 1 one character or in fact an icon)
  • Modify a file (the symbol should now be displayed)
  • Rename the file (in npp)
  • BUG: Symbol no longer displays
  • Use Esc to exit npp (it does without prompting, is this an npp bug?)
  • Restart npp, the symbol is now displayed BUT: MenuIcons is possibly not displaying it... Some part of npp things it is part of the filename and saving doesn't remove it. Actually further test implies this is a second MenuIcons bug and each time you change the symbol (while file unsaved) it forgets the current one is there and adds another to the front,.

Possibly 3rd bug: I realised when typing the above that I could add my own "icon" by unicode, that works for some but wider character such as '💥' are ignored, and in any case they don't display in color when they are.

— Reply to this email directly, view it on GitHub https://github.com/francostellari/NppPlugins/issues/33, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL5TXITJCYUQ7SAQQUDJLZ3WFSMDPANCNFSM6AAAAAARRSYTJ4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Franco

francostellari commented 1 year ago

Please see the new version for

dbareis commented 1 year ago

Thanks, I can confirm the rename issue is fixed.

I have updated npp to latest version 8.4.8, it is still saving the ini file as "UTF-8"!

All attempts to change "%appdata%\Notepad++\plugins\config\menuicons.ini" then restart npp have failed, I tried "UTF-16 LE" & "UTF-16 BE". When it fails it uses my previous "UTF-8" config so that is stored somewhere else? This is before attempting UNICODE symbols...

dbareis commented 1 year ago

I have got it to work (the original unicode value mentioned above and single characters, "space+char" doesn't work):

  1. Close npp
  2. open notepad (not npp)
  3. save the file as "UTF-16 LE" (BE seems to fail horribly)
  4. Restart npp
  5. Make plugin changes
  6. Exit npp (that is when the plugin ini is updated)
  7. The file remains as "UTF-16 LE"
francostellari commented 1 year ago

I did struggle a bit on the UTF format issue. I think the way I did it was to open the current MenuIcons.ini file in N++, select UTF-16 and then save it temporarily with a different name so that closing N++ does not overwrite it. After closing the N++ I deleted/replaced the MenuIcons.ini. Now when you open the file in N++ it should recognize it as UTF-16 if it worked.

On Sun, Jan 1, 2023 at 11:20 PM dbareis @.***> wrote:

Thanks, I can confirm the rename issue is fixed.

I have updated npp to latest version 8.4.8, it is still saving the ini file as "UTF-8"!

All attempts to change "%appdata%\Notepad++\plugins\config\menuicons.ini" then restart npp have failed, I tried "UTF-16 LE" & "UTF-16 BE". When it fails it uses my previous "UTF-8" config so that is stored somewhere else?

— Reply to this email directly, view it on GitHub https://github.com/francostellari/NppPlugins/issues/33#issuecomment-1368647960, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL5TXITJZ6C4OKKTRSIUCSTWQJJRDANCNFSM6AAAAAARRSYTJ4 . You are receiving this because you modified the open/close state.Message ID: @.***>

-- Franco

francostellari commented 1 year ago

Space at the beginning/end of values in INI files is ignored by the APIs. Perhaps you can use _

On Sun, Jan 1, 2023 at 11:41 PM dbareis @.***> wrote:

I have got it to work (the original unicode value mentioned above and single characters, "space+char" doesn't work):

  1. Close npp
  2. open notepad (not npp)
  3. save the file as "UTF-16 LE" (BE seems to fail horribly)
  4. Restart npp
  5. Make plugin changes
  6. Exit npp (that is when the plugin ini is updated)
  7. The file remains as "UTF-16 LE"

— Reply to this email directly, view it on GitHub https://github.com/francostellari/NppPlugins/issues/33#issuecomment-1368653864, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL5TXIXAVWIYVJMAB77MA4LWQJMADANCNFSM6AAAAAARRSYTJ4 . You are receiving this because you modified the open/close state.Message ID: @.***>

-- Franco

dbareis commented 1 year ago

Thanks, I will try "_" again, I tried it while struggling before but I'll try it again :-)

Wouldn't it now be better if the plugin saved the file as UTF-16? It does now if it is already in that format. If it is UTF-8 it could "upgrade" it to "UTF-16?