From f94f5cef35f7cd2322c2c45ba749658887b7bc67 Mon Sep 17 00:00:00 2001 From: François Revel Date: Sat, 11 Oct 2008 16:58:22 +0000 Subject: Fix copying plain text selection. svn path=/trunk/netsurf/; revision=5538 --- beos/beos_window.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/beos/beos_window.cpp b/beos/beos_window.cpp index 32398a6e9..6eadb7ffb 100644 --- a/beos/beos_window.cpp +++ b/beos/beos_window.cpp @@ -1834,6 +1834,7 @@ static bool copy_handler(const char *text, size_t length, struct box *box, void *handle, const char *whitespace_text, size_t whitespace_length) { + bool space = false; //XXX: handle box->style to StyledEdit / RTF ? /* add any whitespace which precedes the text from this box */ if (whitespace_text) { @@ -1852,10 +1853,11 @@ static bool copy_handler(const char *text, size_t length, struct box *box, run->font = font; run->color = nsbeos_rgb_colour(box->style->color); current_selection_textruns.AddItem(run); + space = box->space; } /* add the text from this box */ - if (!gui_add_to_clipboard(text, length, box->space)) + if (!gui_add_to_clipboard(text, length, space)) return false; return true; -- cgit v1.2.3