Fix: Block Uncomment functionality removes comment tags even with quotes#16467
Fix: Block Uncomment functionality removes comment tags even with quotes#16467AbhiSuram wants to merge 1 commit intonotepad-plus-plus:masterfrom
Conversation
| } | ||
| // Do a search for the pattern | ||
| Sci_TextToFind ttf; | ||
| ttf.chrg.cpMin = static_cast<Sci_PositionCR>(fromPos); |
There was a problem hiding this comment.
Use Sci_TextToFindFull and SCI_FINDTEXTFULL instead: https://groups.google.com/g/scintilla-interest/c/mPLwYdC0-FE
Although Sci_PositionCR is effectively the same size as Sci_Position (since N++ 8.3), the Scintilla definition should be preferred.
@chcg, next time there's a Scintilla upgrade, maybe the headers can be edited to include the deprecation warnings currently in the plugin template?, e.g.: https://github.com/npp-plugins/plugintemplate/blob/319c80b1161b332a203b7c6df2cadca6d68a9a88/src/Scintilla.h#L1340
There was a problem hiding this comment.
@rdipardo I had some branch for it since some time (https://github.com/chcg/notepad-plus-plus/tree/deprecate_32bit_sci_structs_and_defines) , but not pushed it so far.
There was a problem hiding this comment.
@chcg , is that something that could be pushed? @rdipardo suggested we wait on npp-plugins/plugintemplate#14 until the deprecation is in the N++ repo, since it will start automatically updating the plugin template from the N++ repo... And we don't want the template to lose its existing deprecation change
|
Apparently, bug #15914 is easier to fix. Just replace in Notepad_plus.cpp around line 8800 within undoStreamComment() and "Block un-comment" will work as expected. Give it a try. |
Bug #15914
Fixing block uncomment functionality for HTML tags, adding in a method and some new conditional checks.