From b37bb0cbff6b969526c9b71243b119c546ffaa1e Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sat, 19 Jul 2008 09:28:45 +0000 Subject: Fix inverted logic. svn path=/trunk/netsurf/; revision=4704 --- desktop/textinput.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/desktop/textinput.c b/desktop/textinput.c index 918b6d42b..d9cf60bef 100644 --- a/desktop/textinput.c +++ b/desktop/textinput.c @@ -2014,8 +2014,10 @@ bool textarea_cut(struct browser_window *bw, /* and the last box */ if (box) { - if (clipboard && gui_add_to_clipboard(box->text + start_idx, + if (clipboard && !gui_add_to_clipboard(box->text + start_idx, end_idx - start_idx, end_idx > box->length)) { + success = false; + } else { if (del) { if (!delete_handler(bw, box, start_idx, end_idx - start_idx)) @@ -2024,8 +2026,6 @@ bool textarea_cut(struct browser_window *bw, textbox_delete(bw, box, start_idx, end_idx - start_idx); } - } else { - success = false; } } -- cgit v1.2.3