mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-16 12:03:03 -05:00
Drag-select now autoscrolls more sensibly.
Selected text now ends up in the clipboard. [originally from svn r98]
This commit is contained in:
parent
a5f734f8e4
commit
eb79017bff
12
mac.c
12
mac.c
@ -1,4 +1,4 @@
|
|||||||
/* $Id: mac.c,v 1.1.2.14 1999/03/11 21:40:31 ben Exp $ */
|
/* $Id: mac.c,v 1.1.2.15 1999/03/14 13:08:43 ben Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1999 Ben Harris
|
* Copyright (c) 1999 Ben Harris
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
@ -393,16 +393,6 @@ static void mac_adjustcursor(void) {
|
|||||||
SetCursor(&qd.arrow);
|
SetCursor(&qd.arrow);
|
||||||
}
|
}
|
||||||
|
|
||||||
void write_clip(void *data, int len) {
|
|
||||||
|
|
||||||
/* XXX: do something */
|
|
||||||
}
|
|
||||||
|
|
||||||
void get_clip(void **p, int *lenp) {
|
|
||||||
|
|
||||||
/* XXX: do something */
|
|
||||||
}
|
|
||||||
|
|
||||||
static void mac_shutdown(void) {
|
static void mac_shutdown(void) {
|
||||||
|
|
||||||
exit(0);
|
exit(0);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $Id: macterm.c,v 1.1.2.19 1999/03/13 18:23:24 ben Exp $ */
|
/* $Id: macterm.c,v 1.1.2.20 1999/03/14 13:08:43 ben Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1999 Ben Harris
|
* Copyright (c) 1999 Ben Harris
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
@ -300,7 +300,6 @@ static void text_click(struct mac_session *s, EventRecord *event) {
|
|||||||
|
|
||||||
void write_clip(void *data, int len) {
|
void write_clip(void *data, int len) {
|
||||||
|
|
||||||
SysBeep(30);
|
|
||||||
if (ZeroScrap() != noErr)
|
if (ZeroScrap() != noErr)
|
||||||
return;
|
return;
|
||||||
PutScrap(len, 'TEXT', data);
|
PutScrap(len, 'TEXT', data);
|
||||||
|
14
terminal.c
14
terminal.c
@ -1376,18 +1376,18 @@ static void sel_spread (void) {
|
|||||||
void term_mouse (Mouse_Button b, Mouse_Action a, int x, int y) {
|
void term_mouse (Mouse_Button b, Mouse_Action a, int x, int y) {
|
||||||
unsigned long *selpoint;
|
unsigned long *selpoint;
|
||||||
|
|
||||||
if (y<0) y = 0;
|
|
||||||
if (y>=rows) y = rows-1;
|
|
||||||
if (x < 0) {
|
if (x < 0) {
|
||||||
if (y > 0) {
|
|
||||||
x = cols - 1;
|
x = cols - 1;
|
||||||
y--;
|
y--;
|
||||||
} else
|
} else if (x >= cols)
|
||||||
x = 0;
|
x = cols - 1;
|
||||||
}
|
|
||||||
if (x>=cols) x = cols-1;
|
|
||||||
|
|
||||||
selpoint = disptop + y * (cols + 1) + x;
|
selpoint = disptop + y * (cols + 1) + x;
|
||||||
|
if (selpoint < sbtop)
|
||||||
|
selpoint = sbtop;
|
||||||
|
else if (selpoint > scrtop + rows * (cols + 1) - 1)
|
||||||
|
/* XXX put this in a variable? */
|
||||||
|
selpoint = scrtop + rows * (cols + 1) - 1;
|
||||||
|
|
||||||
if (b == MB_SELECT && a == MA_CLICK) {
|
if (b == MB_SELECT && a == MA_CLICK) {
|
||||||
deselect();
|
deselect();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user