Skip to content
This repository was archived by the owner on Jan 13, 2024. It is now read-only.

Commit f5a2108

Browse files
author
Savas Ziplies
committed
Changed: ScintillaGateway GetText method now uses length for its byte-array return value, as strings/texts in the editor could be longer/bigger
1 parent a9c4474 commit f5a2108

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Visual Studio Project Template C#/PluginInfrastructure/ScintillaGateway.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1785,7 +1785,7 @@ public unsafe void SetText(string text)
17851785
/// </summary>
17861786
public unsafe string GetText(int length)
17871787
{
1788-
byte[] textBuffer = new byte[10000];
1788+
byte[] textBuffer = new byte[length];
17891789
fixed (byte* textPtr = textBuffer)
17901790
{
17911791
IntPtr res = Win32.SendMessage(scintilla, SciMsg.SCI_GETTEXT, length, (IntPtr) textPtr);

0 commit comments

Comments
 (0)