]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - terminal.c
The edit menu is now mostly functional. I'm not sure about paste, since I
[PuTTY.git] / terminal.c
index da5fe9dab0075e4202bfc423e3309a3780aa3d07..aa5a9a6354ff8fff9d60a65ceed38160e913522e 100644 (file)
@@ -1427,7 +1427,8 @@ void term_mouse (Mouse_Button b, Mouse_Action a, int x, int y) {
        sel_spread();
     } else if ((b == MB_SELECT || b == MB_EXTEND) && a == MA_RELEASE)
        if (selstate == DRAGGING) {
-           term_copy();
+           if (cfg.implicit_copy)
+               term_copy();
            selstate = SELECTED;
        } else
            selstate = NO_SELECTION;
@@ -1492,6 +1493,14 @@ void term_paste() {
     get_clip(NULL, NULL);
 }
 
+/*
+ * Find out if there's a selection.
+ */
+int term_hasselection(void) {
+
+    return selstate == SELECTED;
+}
+
 static void deselect (void) {
     selstate = NO_SELECTION;
     selstart = selend = scrtop;