From 86c2948eb4d4fa75e28182472094d0812fabb29e Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Wed, 9 Feb 2011 20:31:34 +0000 Subject: Fix copying text/plain to clipboard svn path=/trunk/netsurf/; revision=11636 --- windows/gui.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'windows/gui.c') diff --git a/windows/gui.c b/windows/gui.c index ba4dad571..03f3d67ec 100644 --- a/windows/gui.c +++ b/windows/gui.c @@ -2488,13 +2488,15 @@ gui_selection_traverse_handler(const char *text, const char *space_text, size_t space_length) { - if (space_text) { + bool add_space = box != NULL ? box->space : false; + + if (space_text != NULL && space_length > 0) { if (!gui_add_to_clipboard(space_text, space_length, false)) { return false; } } - if (!gui_add_to_clipboard(text, length, box->space)) + if (!gui_add_to_clipboard(text, length, add_space)) return false; return true; -- cgit v1.2.3