1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 18:07:59 +00:00

First attempt at copying to the clipboard -- doesn't seem to work.

Also a bug-fix in auto-scrolling when drag-selecting off the top.

[originally from svn r91]
This commit is contained in:
Ben Harris 1999-03-11 23:23:45 +00:00
parent 84f1e71fad
commit 12064f2245
2 changed files with 21 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $Id: macterm.c,v 1.1.2.17 1999/03/11 21:40:32 ben Exp $ */
/* $Id: macterm.c,v 1.1.2.18 1999/03/11 23:23:45 ben Exp $ */
/*
* Copyright (c) 1999 Ben Harris
* All rights reserved.
@ -285,12 +285,26 @@ static void text_click(struct mac_session *s, EventRecord *event) {
MA_DRAG, col, row);
if (row > rows - 1)
term_scroll(0, row - (rows - 1));
else if (row < 0)
term_scroll(0, row);
else if (row <= 0)
term_scroll(0, row - 1);
}
term_mouse(event->modifiers & shiftKey ? MB_EXTEND : MB_SELECT, MA_RELEASE,
col, row);
lastwhen = TickCount();
}
void write_clip(void *data, int len) {
if (ZeroScrap() != noErr)
return;
PutScrap(len, 'TEXT', data);
}
void get_clip(void **p, int *lenp) {
/* XXX: do something */
}
static pascal void mac_scrolltracker(ControlHandle control, short part) {
struct mac_session *s;

View File

@ -53,7 +53,11 @@ typedef struct mac_session *Context;
typedef HDC Context;
#endif /* not macintosh */
#ifdef macintosh
#define SEL_NL { 13 }
#else
#define SEL_NL { 13, 10 }
#endif
/*
* Global variables. Most modules declare these `extern', but