]> git.ipfire.org Git - ipfire-3.x.git/blob - vim/patches/vim-7.3.353.patch0
vim: Import latest patches from upstream.
[ipfire-3.x.git] / vim / patches / vim-7.3.353.patch0
1 To: vim_dev@googlegroups.com
2 Subject: Patch 7.3.353
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.3.353 (after 7.3.343)
11 Problem: Missing part of the urxvt patch.
12 Solution: Add the change in term.c
13 Files: src/term.c
14
15
16 *** ../vim-7.3.352/src/term.c 2011-09-14 14:43:21.000000000 +0200
17 --- src/term.c 2011-10-26 23:48:01.000000000 +0200
18 ***************
19 *** 4008,4014 ****
20 }
21
22 #ifdef FEAT_TERMRESPONSE
23 ! if (key_name[0] == NUL)
24 {
25 /* Check for xterm version string: "<Esc>[>{x};{vers};{y}c". Also
26 * eat other possible responses to t_RV, rxvt returns
27 --- 4008,4016 ----
28 }
29
30 #ifdef FEAT_TERMRESPONSE
31 ! if (key_name[0] == NUL
32 ! /* URXVT mouse uses <ESC>[#;#;#M, but we are matching <ESC>[ */
33 ! || key_name[0] == KS_URXVT_MOUSE)
34 {
35 /* Check for xterm version string: "<Esc>[>{x};{vers};{y}c". Also
36 * eat other possible responses to t_RV, rxvt returns
37 ***************
38 *** 4047,4053 ****
39 if (tp[1 + (tp[0] != CSI)] == '>' && j == 2)
40 {
41 /* if xterm version >= 95 use mouse dragging */
42 ! if (extra >= 95)
43 set_option_value((char_u *)"ttym", 0L,
44 (char_u *)"xterm2", 0);
45 /* if xterm version >= 141 try to get termcap codes */
46 --- 4049,4055 ----
47 if (tp[1 + (tp[0] != CSI)] == '>' && j == 2)
48 {
49 /* if xterm version >= 95 use mouse dragging */
50 ! if (extra >= 95 && ttym_flags != TTYM_URXVT)
51 set_option_value((char_u *)"ttym", 0L,
52 (char_u *)"xterm2", 0);
53 /* if xterm version >= 141 try to get termcap codes */
54 ***************
55 *** 4141,4146 ****
56 --- 4143,4151 ----
57 # ifdef FEAT_MOUSE_PTERM
58 || key_name[0] == (int)KS_PTERM_MOUSE
59 # endif
60 + # ifdef FEAT_MOUSE_URXVT
61 + || key_name[0] == (int)KS_URXVT_MOUSE
62 + # endif
63 )
64 {
65 is_click = is_drag = FALSE;
66 ***************
67 *** 4219,4225 ****
68 --- 4224,4292 ----
69 else
70 break;
71 }
72 + }
73 +
74 + # ifdef FEAT_MOUSE_URXVT
75 + if (key_name[0] == (int)KS_URXVT_MOUSE)
76 + {
77 + for (;;)
78 + {
79 + /* URXVT 1015 mouse reporting mode:
80 + * Almost identical to xterm mouse mode, except the values
81 + * are decimal instead of bytes.
82 + *
83 + * \033[%d;%d;%dM
84 + * ^-- row
85 + * ^----- column
86 + * ^-------- code
87 + */
88 + p = tp + slen;
89 +
90 + mouse_code = getdigits(&p);
91 + if (*p++ != ';')
92 + return -1;
93 +
94 + mouse_col = getdigits(&p) - 1;
95 + if (*p++ != ';')
96 + return -1;
97 +
98 + mouse_row = getdigits(&p) - 1;
99 + if (*p++ != 'M')
100 + return -1;
101 +
102 + slen += (int)(p - (tp + slen));
103 +
104 + /* skip this one if next one has same code (like xterm
105 + * case) */
106 + j = termcodes[idx].len;
107 + if (STRNCMP(tp, tp + slen, (size_t)j) == 0) {
108 + /* check if the command is complete by looking for the
109 + * M */
110 + int slen2;
111 + int cmd_complete = 0;
112 + for (slen2 = slen; slen2 < len; slen2++) {
113 + if (tp[slen2] == 'M') {
114 + cmd_complete = 1;
115 + break;
116 + }
117 + }
118 + p += j;
119 + if (cmd_complete && getdigits(&p) == mouse_code) {
120 + slen += j; /* skip the \033[ */
121 + continue;
122 + }
123 + }
124 + break;
125 + }
126 + }
127 + # endif
128
129 + if (key_name[0] == (int)KS_MOUSE
130 + #ifdef FEAT_MOUSE_URXVT
131 + || key_name[0] == (int)KS_URXVT_MOUSE
132 + #endif
133 + )
134 + {
135 # if !defined(MSWIN) && !defined(MSDOS)
136 /*
137 * Handle mouse events.
138 *** ../vim-7.3.352/src/version.c 2011-10-26 22:02:10.000000000 +0200
139 --- src/version.c 2011-10-26 23:43:26.000000000 +0200
140 ***************
141 *** 716,717 ****
142 --- 716,719 ----
143 { /* Add new patch number below this line */
144 + /**/
145 + 353,
146 /**/
147
148 --
149 hundred-and-one symptoms of being an internet addict:
150 99. The hum of a cooling fan and the click of keys is comforting to you.
151
152 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
153 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
154 \\\ an exciting new programming language -- http://www.Zimbu.org ///
155 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///