mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-02-04 06:02:24 +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:
parent
84f1e71fad
commit
12064f2245
20
macterm.c
20
macterm.c
@ -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
|
* Copyright (c) 1999 Ben Harris
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
@ -285,12 +285,26 @@ static void text_click(struct mac_session *s, EventRecord *event) {
|
|||||||
MA_DRAG, col, row);
|
MA_DRAG, col, row);
|
||||||
if (row > rows - 1)
|
if (row > rows - 1)
|
||||||
term_scroll(0, row - (rows - 1));
|
term_scroll(0, row - (rows - 1));
|
||||||
else if (row < 0)
|
else if (row <= 0)
|
||||||
term_scroll(0, row);
|
term_scroll(0, row - 1);
|
||||||
}
|
}
|
||||||
|
term_mouse(event->modifiers & shiftKey ? MB_EXTEND : MB_SELECT, MA_RELEASE,
|
||||||
|
col, row);
|
||||||
lastwhen = TickCount();
|
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) {
|
static pascal void mac_scrolltracker(ControlHandle control, short part) {
|
||||||
struct mac_session *s;
|
struct mac_session *s;
|
||||||
|
|
||||||
|
4
putty.h
4
putty.h
@ -53,7 +53,11 @@ typedef struct mac_session *Context;
|
|||||||
typedef HDC Context;
|
typedef HDC Context;
|
||||||
#endif /* not macintosh */
|
#endif /* not macintosh */
|
||||||
|
|
||||||
|
#ifdef macintosh
|
||||||
|
#define SEL_NL { 13 }
|
||||||
|
#else
|
||||||
#define SEL_NL { 13, 10 }
|
#define SEL_NL { 13, 10 }
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Global variables. Most modules declare these `extern', but
|
* Global variables. Most modules declare these `extern', but
|
||||||
|
Loading…
Reference in New Issue
Block a user