summaryrefslogtreecommitdiff
path: root/cocoa
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2011-02-09 20:31:34 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2011-02-09 20:31:34 +0000
commit86c2948eb4d4fa75e28182472094d0812fabb29e (patch)
tree9664dc2a1e91813c2cd8267f3f4ed0fcd5cacf2d /cocoa
parentf04cc9e9ec0be48d8d3712fc91094c401e3cc471 (diff)
downloadnetsurf-86c2948eb4d4fa75e28182472094d0812fabb29e.tar.gz
netsurf-86c2948eb4d4fa75e28182472094d0812fabb29e.tar.bz2
Fix copying text/plain to clipboard
svn path=/trunk/netsurf/; revision=11636
Diffstat (limited to 'cocoa')
-rw-r--r--cocoa/selection.m4
1 files changed, 3 insertions, 1 deletions
diff --git a/cocoa/selection.m b/cocoa/selection.m
index cb0c3dca9..208776ebb 100644
--- a/cocoa/selection.m
+++ b/cocoa/selection.m
@@ -72,9 +72,11 @@ static bool cocoa_clipboard_copy_handler(const char *text, size_t length, struct
void *handle, const char *whitespace_text,
size_t whitespace_length)
{
+ bool add_space = box != NULL ? box->space : false;
+
if (whitespace_text && !gui_add_to_clipboard( whitespace_text,
whitespace_length, false )) return false;
- return gui_add_to_clipboard( text, length, box->space );
+ return gui_add_to_clipboard( text, length, add_space );
}
bool gui_commit_clipboard(void)