Want the ability to delete some context menu items from Doc Switch panel



  • When you click the “Close” item in the context menu to close a document in the Doc Switcher, you sometimes accidentally click on items such as “Close All” directly below, resulting in dozens of documents being closed. This makes it impossible to do the undo of the source code that was being modified, and it’s hard to know what the documents in the session were:

    notepadpp_docswitcher_menu.jpg

    I’d like you to implement the ability to add or remove all individual items in the context menu that appear in the Doc Switch panel in the notepad++ itself or plug-in. Personally, I would like to eliminate the four to five close-related items under the ‘close’ item and the ‘Move to Recycling Bin’.

    I hope this feature will be added to the next version of Notepad++, but if that’s difficult, I would appreciate it if plug-in developers could create a plug-in that implemented it.



  • @BoonHongE see here if it should be implemented natively.



  • @BoonHongE

    Suggest you use the File menu’s version of the Close command to avoid this terrible defect in the Notepad++ software. Oh, wait, you could accidentally choose the wrong version of “close” there, too.

    How about the keycombination version of Close (Ctrl+w); oh, wait, you could slip and press Ctrl+e or Ctrl+q and who knows the destruction that could happen depending upon what they are assigned to.

    I suppose there is no solution to this terrible problem!



  • @Ekopalypse Thanks for the link!



  • @Alan-Kilborn said in Want the ability to delete some context menu items from Doc Switch panel:

    Snap3.jpg

    Originally, I was going to develop a plug-in that would disable or change context menus, but after two days of holding onto it because of my poor knowledge of MFC coding, I decided to modify the source code of notepad++ and build it in Visual Studio Community edition. So I searched the source code files and found out which parts to modify. As you can see from the screenshot, I had to modify two files.

    I finally succeeded in building the error code by using Google search power to search for the error code and correct the problem after half a day without being able to build it due to minor warnings and errors in the source code. The built ‘notepad++.exe’ file was overwritten in a folder that was already installed, and most of the menu items were removed as I wanted, such as a screenshot.

    Before that, it was common to be embarrassed because it was difficult to predict which direction the tall context menu panel would be displayed vertically, or to accidentally press the “close all” item. I’m so happy that it didn’t happen anymore.

    I turned off ‘automatic updates’, but even if I update them later, I’ll have to get the source code for the new version, modify it like this, and build it. If a competent developer develop and release the Doc Switcher as a single plug-in or, like I did, an advanced plug-in that has eliminated most of the context menu items, this inconvenience will be eliminated. But In my Google search, I found a lot of similar requests for improvement on DocSwitcher over the last five years. Judging from the fact that they haven’t been reflected at all so far, I don’t think I can expect much from now on. Thank you both for your answers.


Log in to reply