diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2011-02-09 20:31:34 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2011-02-09 20:31:34 +0000 |
commit | 86c2948eb4d4fa75e28182472094d0812fabb29e (patch) | |
tree | 9664dc2a1e91813c2cd8267f3f4ed0fcd5cacf2d /riscos | |
parent | f04cc9e9ec0be48d8d3712fc91094c401e3cc471 (diff) | |
download | netsurf-86c2948eb4d4fa75e28182472094d0812fabb29e.tar.gz netsurf-86c2948eb4d4fa75e28182472094d0812fabb29e.tar.bz2 |
Fix copying text/plain to clipboard
svn path=/trunk/netsurf/; revision=11636
Diffstat (limited to 'riscos')
-rw-r--r-- | riscos/textselection.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/riscos/textselection.c b/riscos/textselection.c index 369346ca0..07a87e50b 100644 --- a/riscos/textselection.c +++ b/riscos/textselection.c @@ -207,15 +207,18 @@ bool copy_handler(const char *text, size_t length, struct box *box, void *handle, const char *whitespace_text, size_t whitespace_length) { + bool add_space = box != NULL ? box->space : false; + /* add any whitespace which precedes the text from this box */ - if (whitespace_text) { + if (whitespace_text != NULL && whitespace_length > 0) { if (!gui_add_to_clipboard(whitespace_text, whitespace_length, false)) { return false; } } + /* add the text from this box */ - if (!gui_add_to_clipboard(text, length, box->space)) + if (!gui_add_to_clipboard(text, length, add_space)) return false; return true; |