summaryrefslogtreecommitdiff
path: root/src/ui/documentwidget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/documentwidget.c')
-rw-r--r--src/ui/documentwidget.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index b954040a..676c94bd 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -1097,7 +1097,7 @@ static iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd)
1097 : "Not trusted")); 1097 : "Not trusted"));
1098 return iTrue; 1098 return iTrue;
1099 } 1099 }
1100 else if (equal_Command(cmd, "copy") && document_App() == d) { 1100 else if (equal_Command(cmd, "copy") && document_App() == d && !focus_Widget()) {
1101 iString *copied; 1101 iString *copied;
1102 if (d->selectMark.start) { 1102 if (d->selectMark.start) {
1103 iRangecc mark = d->selectMark; 1103 iRangecc mark = d->selectMark;
@@ -1441,6 +1441,7 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e
1441 case drag_ClickResult: { 1441 case drag_ClickResult: {
1442 /* Begin selecting a range of text. */ 1442 /* Begin selecting a range of text. */
1443 if (!d->selecting) { 1443 if (!d->selecting) {
1444 setFocus_Widget(NULL); /* TODO: Focus this document? */
1444 d->selecting = iTrue; 1445 d->selecting = iTrue;
1445 d->selectMark.start = d->selectMark.end = 1446 d->selectMark.start = d->selectMark.end =
1446 sourceLoc_DocumentWidget_(d, d->click.startPos); 1447 sourceLoc_DocumentWidget_(d, d->click.startPos);