Skip to content
This repository was archived by the owner on May 29, 2026. It is now read-only.

Commit 3c3e57c

Browse files
BugFix: txt file might include \0. So SCI_SETTEXT is not usable.
1 parent 90562e6 commit 3c3e57c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

NppGZipFileViewer/NppGZipFileViewerHelper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ internal static Encoding SetDecodedText(MemoryStream decodedContentStream)
118118

119119
var pinnedArray = GCHandle.Alloc(buffer, GCHandleType.Pinned);
120120

121-
//Win32.SendMessage(PluginBase.GetCurrentScintilla(), SciMsg.SCI_CLEARALL, 0, 0);
121+
Win32.SendMessage(PluginBase.GetCurrentScintilla(), SciMsg.SCI_CLEARALL, 0, 0);
122122
scintillaGateway.SetCodePage(65001);
123-
Win32.SendMessage(PluginBase.GetCurrentScintilla(), SciMsg.SCI_SETTEXT, buffer.Length, pinnedArray.AddrOfPinnedObject());
123+
Win32.SendMessage(PluginBase.GetCurrentScintilla(), SciMsg.SCI_ADDTEXT, buffer.Length, pinnedArray.AddrOfPinnedObject());
124124
pinnedArray.Free();
125125
return srcEncoding;
126126
}

0 commit comments

Comments
 (0)