Fix for "Toggle Single Line Comment" malfunctioning with HTML/XML
Add space for a null character so last line character does not get cut off, and thus allow closing tag to be matched properly. Fix #3869, close #3870
This commit is contained in:
parent
6896c801ac
commit
166cb3fc9a
@ -3985,7 +3985,7 @@ bool Notepad_plus::doBlockComment(comment_mode currCommentMode)
|
||||
//The NORMAL MODE is used for all Lexers which have a commentLineSymbol defined.
|
||||
//The ADVANCED MODE is only available for Lexers which do not have a commentLineSymbol but commentStreamSymbols (start/end) defined.
|
||||
//The ADVANCED MODE behaves the same way as the NORMAL MODE (comment/uncomment every single line in the selection range separately)
|
||||
//but uses two smbols to accomplish this.
|
||||
//but uses two symbols to accomplish this.
|
||||
bool isSingleLineAdvancedMode = false;
|
||||
|
||||
if (buf->getLangType() == L_USER)
|
||||
@ -4107,7 +4107,7 @@ bool Notepad_plus::doBlockComment(comment_mode currCommentMode)
|
||||
if (avoidIndent)
|
||||
lineIndent = lineStart;
|
||||
|
||||
size_t linebufferSize = lineEnd - lineIndent + comment_length;
|
||||
size_t linebufferSize = lineEnd - lineIndent + 1;
|
||||
TCHAR* linebuf = new TCHAR[linebufferSize];
|
||||
|
||||
_pEditView->getGenericText(linebuf, linebufferSize, lineIndent, lineEnd);
|
||||
|
Loading…
Reference in New Issue
Block a user