projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed now obsolete sizetip.h from window.obj dependencies
[u/mdw/putty]
/
terminal.c
diff --git
a/terminal.c
b/terminal.c
index
a935be7
..
f4669df
100644
(file)
--- a/
terminal.c
+++ b/
terminal.c
@@
-628,6
+628,8
@@
void term_out(void) {
scroll (marg_t, marg_b, 1, TRUE);
else if (curs_y < rows-1)
curs_y++;
scroll (marg_t, marg_b, 1, TRUE);
else if (curs_y < rows-1)
curs_y++;
+ if (cfg.lfhascr)
+ curs_x = 0;
fix_cpos;
wrapnext = FALSE;
disptop = scrtop;
fix_cpos;
wrapnext = FALSE;
disptop = scrtop;
@@
-663,7
+665,7
@@
void term_out(void) {
if (insert)
insch (1);
check_selection (cpos, cpos+1);
if (insert)
insch (1);
check_selection (cpos, cpos+1);
- *cpos++ =
c | curr_attr |
+ *cpos++ =
xlat_tty2scr((unsigned char)c) | curr_attr |
(c <= 0x7F ? cset_attr[cset] : ATTR_ASCII);
curs_x++;
if (curs_x == cols) {
(c <= 0x7F ? cset_attr[cset] : ATTR_ASCII);
curs_x++;
if (curs_x == cols) {
@@
-927,12
+929,12
@@
void term_out(void) {
}
break;
case 'r': /* set scroll margins */
}
break;
case 'r': /* set scroll margins */
- if (esc_nargs <= 2) {
+ if (
!esc_query &&
esc_nargs <= 2) {
int top, bot;
top = def(esc_args[0], 1) - 1;
if (top < 0)
top = 0;
int top, bot;
top = def(esc_args[0], 1) - 1;
if (top < 0)
top = 0;
- bot = (esc_nargs
== 1
? rows :
+ bot = (esc_nargs
<= 1 || esc_args[1] == 0
? rows :
def(esc_args[1], rows)) - 1;
if (bot >= rows)
bot = rows-1;
def(esc_args[1], rows)) - 1;
if (bot >= rows)
bot = rows-1;
@@
-1343,7
+1345,13
@@
void term_mouse (Mouse_Button b, Mouse_Action a, int x, int y) {
if (y<0) y = 0;
if (y>=rows) y = rows-1;
if (y<0) y = 0;
if (y>=rows) y = rows-1;
- if (x<0) x = 0;
+ if (x<0) {
+ if (y > 0) {
+ x = cols-1;
+ y--;
+ } else
+ x = 0;
+ }
if (x>=cols) x = cols-1;
selpoint = disptop + y * (cols+1) + x;
if (x>=cols) x = cols-1;
selpoint = disptop + y * (cols+1) + x;
@@
-1428,7
+1436,17
@@
void term_mouse (Mouse_Button b, Mouse_Action a, int x, int y) {
!(p <= data+len-sizeof(sel_nl) &&
!memcmp(p, sel_nl, sizeof(sel_nl))))
p++;
!(p <= data+len-sizeof(sel_nl) &&
!memcmp(p, sel_nl, sizeof(sel_nl))))
p++;
- back->send (q, p-q);
+
+ {
+ int i;
+ unsigned char c;
+ for(i=0;i<p-q;i++)
+ {
+ c=xlat_kbd2tty(q[i]);
+ back->send(&c,1);
+ }
+ }
+
if (p <= data+len-sizeof(sel_nl) &&
!memcmp(p, sel_nl, sizeof(sel_nl))) {
back->send ("\r", 1);
if (p <= data+len-sizeof(sel_nl) &&
!memcmp(p, sel_nl, sizeof(sel_nl))) {
back->send ("\r", 1);