]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blob - vim/patches/vim-7.3.513.patch0
Merge remote-tracking branch 'stevee/openvswitch-systemd'
[people/amarx/ipfire-3.x.git] / vim / patches / vim-7.3.513.patch0
1 To: vim_dev@googlegroups.com
2 Subject: Patch 7.3.513
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.513
11 Problem: Cannot use CTRL-E and CTRL-Y with "r".
12 Solution: Make CTRL-E and CTRL-Y work like in Insert mode. (Christian
13 Brabandt)
14 Files: src/edit.c, src/normal.c, src/proto/edit.pro
15
16
17 *** ../vim-7.3.512/src/edit.c 2012-04-05 16:07:01.000000000 +0200
18 --- src/edit.c 2012-04-30 17:53:47.000000000 +0200
19 ***************
20 *** 253,259 ****
21 #ifdef FEAT_DIGRAPHS
22 static int ins_digraph __ARGS((void));
23 #endif
24 - static int ins_copychar __ARGS((linenr_T lnum));
25 static int ins_ctrl_ey __ARGS((int tc));
26 #ifdef FEAT_SMARTINDENT
27 static void ins_try_si __ARGS((int c));
28 --- 253,258 ----
29 ***************
30 *** 9899,9905 ****
31 * Handle CTRL-E and CTRL-Y in Insert mode: copy char from other line.
32 * Returns the char to be inserted, or NUL if none found.
33 */
34 ! static int
35 ins_copychar(lnum)
36 linenr_T lnum;
37 {
38 --- 9898,9904 ----
39 * Handle CTRL-E and CTRL-Y in Insert mode: copy char from other line.
40 * Returns the char to be inserted, or NUL if none found.
41 */
42 ! int
43 ins_copychar(lnum)
44 linenr_T lnum;
45 {
46 *** ../vim-7.3.512/src/normal.c 2012-03-28 12:59:53.000000000 +0200
47 --- src/normal.c 2012-04-30 18:06:13.000000000 +0200
48 ***************
49 *** 7070,7076 ****
50 for (n = cap->count1; n > 0; --n)
51 {
52 State = REPLACE;
53 ! ins_char(cap->nchar);
54 State = old_State;
55 if (cap->ncharC1 != 0)
56 ins_char(cap->ncharC1);
57 --- 7070,7087 ----
58 for (n = cap->count1; n > 0; --n)
59 {
60 State = REPLACE;
61 ! if (cap->nchar == Ctrl_E || cap->nchar == Ctrl_Y)
62 ! {
63 ! int c = ins_copychar(curwin->w_cursor.lnum
64 ! + (cap->nchar == Ctrl_Y ? -1 : 1));
65 ! if (c != NUL)
66 ! ins_char(c);
67 ! else
68 ! /* will be decremented further down */
69 ! ++curwin->w_cursor.col;
70 ! }
71 ! else
72 ! ins_char(cap->nchar);
73 State = old_State;
74 if (cap->ncharC1 != 0)
75 ins_char(cap->ncharC1);
76 ***************
77 *** 7092,7098 ****
78 * line will be changed.
79 */
80 ptr = ml_get_buf(curbuf, curwin->w_cursor.lnum, TRUE);
81 ! ptr[curwin->w_cursor.col] = cap->nchar;
82 if (p_sm && msg_silent == 0)
83 showmatch(cap->nchar);
84 ++curwin->w_cursor.col;
85 --- 7103,7117 ----
86 * line will be changed.
87 */
88 ptr = ml_get_buf(curbuf, curwin->w_cursor.lnum, TRUE);
89 ! if (cap->nchar == Ctrl_E || cap->nchar == Ctrl_Y)
90 ! {
91 ! int c = ins_copychar(curwin->w_cursor.lnum
92 ! + (cap->nchar == Ctrl_Y ? -1 : 1));
93 ! if (c != NUL)
94 ! ptr[curwin->w_cursor.col] = c;
95 ! }
96 ! else
97 ! ptr[curwin->w_cursor.col] = cap->nchar;
98 if (p_sm && msg_silent == 0)
99 showmatch(cap->nchar);
100 ++curwin->w_cursor.col;
101 *** ../vim-7.3.512/src/proto/edit.pro 2010-08-15 21:57:28.000000000 +0200
102 --- src/proto/edit.pro 2012-04-30 17:54:41.000000000 +0200
103 ***************
104 *** 39,42 ****
105 --- 39,43 ----
106 int hkmap __ARGS((int c));
107 void ins_scroll __ARGS((void));
108 void ins_horscroll __ARGS((void));
109 + int ins_copychar __ARGS((linenr_T lnum));
110 /* vim: set ft=c : */
111 *** ../vim-7.3.512/src/version.c 2012-04-30 17:35:44.000000000 +0200
112 --- src/version.c 2012-04-30 18:17:52.000000000 +0200
113 ***************
114 *** 716,717 ****
115 --- 716,719 ----
116 { /* Add new patch number below this line */
117 + /**/
118 + 513,
119 /**/
120
121 --
122 It is illegal for anyone to try and stop a child from playfully jumping over
123 puddles of water.
124 [real standing law in California, United States of America]
125
126 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
127 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
128 \\\ an exciting new programming language -- http://www.Zimbu.org ///
129 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///