1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-16 02:27:32 -05:00

The edit menu is now mostly functional. I'm not sure about paste, since I

haven't got a working backend at the moment, but it all looks OK.

[originally from svn r118]
This commit is contained in:
Ben Harris
1999-03-16 20:27:31 +00:00
parent fc69aeef23
commit e43dc5ecd4
8 changed files with 124 additions and 25 deletions

View 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;