~mdw
/
sgt
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Lionel Fourquaux offers this very simple patch to speed up SFTP,
[sgt/putty]
/
terminal.c
diff --git
a/terminal.c
b/terminal.c
index
d23f054
..
806d650
100644
(file)
--- a/
terminal.c
+++ b/
terminal.c
@@
-1,3
+1,7
@@
+/*
+ * Terminal emulator.
+ */
+
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
@@
-4093,7
+4097,7
@@
static void term_out(Terminal *term)
break;
case SEEN_OSC_P:
{
break;
case SEEN_OSC_P:
{
- int max = (term->osc_strlen == 0 ? 21 : 1
6
);
+ int max = (term->osc_strlen == 0 ? 21 : 1
5
);
int val;
if ((int)c >= '0' && (int)c <= '9')
val = c - '0';
int val;
if ((int)c >= '0' && (int)c <= '9')
val = c - '0';
@@
-4822,10
+4826,12
@@
static void do_paint(Terminal *term, Context ctx, int may_optimise)
!= newline[j].attr) {
int k;
!= newline[j].attr) {
int k;
- for (k = laststart; k < j; k++)
- term->disptext[i]->chars[k].attr |= ATTR_INVALID;
+ if (!dirtyrect) {
+ for (k = laststart; k < j; k++)
+ term->disptext[i]->chars[k].attr |= ATTR_INVALID;
- dirtyrect = TRUE;
+ dirtyrect = TRUE;
+ }
}
if (dirtyrect)
}
if (dirtyrect)