aboutsummaryrefslogtreecommitdiff
path: root/src/scintilla.patch
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2014-10-09 13:05:54 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2014-10-09 13:05:54 -0400
commit776fa863178ee883f1a1c405d67e3796b0b5b000 (patch)
treefbc99dbb8702a41702821d7d04385265d501dc79 /src/scintilla.patch
parent0822979e363ae4a6f765a7bdf79b9f5ee861f77b (diff)
downloadtextadept-776fa863178ee883f1a1c405d67e3796b0b5b000.tar.gz
textadept-776fa863178ee883f1a1c405d67e3796b0b5b000.zip
Patch Scintilla to fix pasting from external Win32 apps; src/scintilla.patch
Diffstat (limited to 'src/scintilla.patch')
-rw-r--r--src/scintilla.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/scintilla.patch b/src/scintilla.patch
index 3b30a825..ec27dfcd 100644
--- a/src/scintilla.patch
+++ b/src/scintilla.patch
@@ -18,3 +18,20 @@ diff -r 5693714a8b0b src/Catalogue.cxx
return 1;
}
+diff -r 326449de45d0 gtk/ScintillaGTK.cxx
+--- a/gtk/ScintillaGTK.cxx Thu Sep 25 09:48:50 2014 +1000
++++ b/gtk/ScintillaGTK.cxx Tue Oct 07 12:28:16 2014 -0400
+@@ -1563,6 +1563,13 @@
+ len--; // Forget the extra '\0'
+ #endif
+
++#if PLAT_GTK_WIN32
++ // Win32 includes an ending '\0' byte in 'len' for clipboard text from
++ // external applications; ignore it.
++ if (len > 0 && data[len - 1] == '\0')
++ len--;
++#endif
++
+ std::string dest(data, len);
+ if (selectionTypeData == GDK_TARGET_STRING) {
+ if (IsUnicodeMode()) {