aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2010-03-17 23:27:46 +0000
committernyamatongwe <devnull@localhost>2010-03-17 23:27:46 +0000
commitb546d224e8bb3b86d31e8bcbd5757616e5787ae7 (patch)
tree7ac38caae57a9c756b971bc0d32bdb284b564f33
parenta75b61086a39ed0a45bcc3e1ff994e223b77c45c (diff)
downloadscintilla-mirror-b546d224e8bb3b86d31e8bcbd5757616e5787ae7.tar.gz
Fixed bug where extra NUL was inserted when pasting a rectangular
selection.
-rw-r--r--gtk/ScintillaGTK.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx
index 3ef3c45ed..88e4d8598 100644
--- a/gtk/ScintillaGTK.cxx
+++ b/gtk/ScintillaGTK.cxx
@@ -1491,6 +1491,8 @@ void ScintillaGTK::GetGtkSelectionText(GtkSelectionData *selectionData, Selectio
isRectangular = ::IsClipboardFormatAvailable(cfColumnSelect) != 0;
#else
isRectangular = ((len > 2) && (data[len - 1] == 0 && data[len - 2] == '\n'));
+ if (isRectangular)
+ len--; // Forget the extra '\0'
#endif
char *dest;