3 Make the home/end keys work on BSD servers as well as Linux ones
6 ===================================================================
7 --- unix/gtkwin.c (revision 8466)
8 +++ unix/gtkwin.c (working copy)
10 use_ucsoutput = FALSE;
13 - if (inst->cfg.rxvt_homeend && (code == 1 || code == 4)) {
14 - end = 1 + sprintf(output+1, code == 1 ? "\x1B[H" : "\x1BOw");
15 - use_ucsoutput = FALSE;
17 + if (code == 1 || code == 4) {
18 + /* Send the correct XTerm or rxvt codes for home/end
19 + * We used to send ^[1~ and [4~ for Xterm,
20 + * but those are Linux console */
22 + if (inst->cfg.rxvt_homeend)
23 + he = code == 1 ? "\x1B[7~" : "\x1B[8~";
25 + he = code == 1 ? "\x1BOH" : "\x1BOF";
26 + end = 1 + sprintf(output+1, he);