pkgsrc/security/putty-devel/patches/patch-al
ahoka 27ce463e2d Import putty-0.6.20090906 as security/putty-devel.
PuTTY is a client program for the SSH, Telnet and Rlogin network protocols.

These protocols are all used to run a remote session on a computer, over a
network. PuTTY implements the client end of that session: the end at which
the session is displayed, rather than the end at which it runs.
2009-09-07 18:01:43 +00:00

28 lines
955 B
Text

$NetBSD: patch-al,v 1.1.1.1 2009/09/07 18:01:43 ahoka Exp $
Make the home/end keys work on BSD servers as well as Linux ones
Index: windows/window.c
===================================================================
--- windows/window.c (revision 8466)
+++ windows/window.c (working copy)
@@ -4189,8 +4189,17 @@
p += sprintf((char *) p, "\x1BO%c", code + 'P' - 11);
return p - output;
}
- if (cfg.rxvt_homeend && (code == 1 || code == 4)) {
- p += sprintf((char *) p, code == 1 ? "\x1B[H" : "\x1BOw");
+ /* Home/End */
+ if (code == 1 || code == 4) {
+ /* Send the correct XTerm or rxvt codes for home/end
+ * We used to send ^[1~ and [4~ for Xterm,
+ * but those are Linux console */
+ const char *he;
+ if (cfg.rxvt_homeend)
+ he = code == 1 ? "\x1B[7~" : "\x1B[8~";
+ else
+ he = code == 1 ? "\x1BOH" : "\x1BOF";
+ p += sprintf((char *) p, he);
return p - output;
}
if (code) {