From 13c82ea2ab89755ee9c60ab6975d587242871e07 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Wed, 17 Mar 2010 23:27:46 +0000 Subject: Fixed bug where extra NUL was inserted when pasting a rectangular selection. --- gtk/ScintillaGTK.cxx | 2 ++ 1 file changed, 2 insertions(+) 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; -- cgit v1.2.3