]> git.pld-linux.org Git - packages/vim.git/blob - 6.2.493
- new
[packages/vim.git] / 6.2.493
1 To: vim-dev@vim.org
2 Subject: Patch 6.2.493
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 6.2.493
11 Problem:    "@x" doesn't work when 'insertmode' is set. (Benji Fisher)
12 Solution:   Put "restart_edit" in the typeahead buffer, so that it's used
13             after executing the register contents.
14 Files:      src/ops.c
15
16
17 *** ../vim-6.2.492/src/ops.c    Mon Apr 19 20:26:43 2004
18 --- src/ops.c   Fri Apr 23 15:14:01 2004
19 ***************
20 *** 96,101 ****
21 --- 96,102 ----
22   #endif
23   static void   get_yank_register __ARGS((int regname, int writing));
24   static int    stuff_yank __ARGS((int, char_u *));
25 + static void   put_reedit_in_typebuf __ARGS((void));
26   static int    put_in_typebuf __ARGS((char_u *s, int colon));
27   static void   stuffescaped __ARGS((char_u *arg, int literally));
28   static int    get_spec_reg __ARGS((int regname, char_u **argp, int *allocated, int errmsg));
29 ***************
30 *** 1154,1159 ****
31 --- 1155,1161 ----
32         /*
33          * Insert lines into typeahead buffer, from last one to first one.
34          */
35 +       put_reedit_in_typebuf();
36         for (i = y_current->y_size; --i >= 0; )
37         {
38             /* insert NL between lines and after last line if type is MLINE */
39 ***************
40 *** 1175,1180 ****
41 --- 1177,1209 ----
42       return retval;
43   }
44   
45 + /*
46 +  * If "restart_edit" is not zero, put it in the typeahead buffer, so that it's
47 +  * used only after other typeahead has been processed.
48 +  */
49 +     static void
50 + put_reedit_in_typebuf()
51 + {
52 +     char_u    buf[3];
53
54 +     if (restart_edit != NUL)
55 +     {
56 +       if (restart_edit == 'V')
57 +       {
58 +           buf[0] = 'g';
59 +           buf[1] = 'R';
60 +           buf[2] = NUL;
61 +       }
62 +       else
63 +       {
64 +           buf[0] = restart_edit == 'I' ? 'i' : restart_edit;
65 +           buf[1] = NUL;
66 +       }
67 +       if (ins_typebuf(buf, REMAP_NONE, 0, TRUE, FALSE) == OK)
68 +           restart_edit = NUL;
69 +     }
70 + }
71
72       static int
73   put_in_typebuf(s, colon)
74       char_u    *s;
75 ***************
76 *** 1182,1187 ****
77 --- 1211,1217 ----
78   {
79       int               retval = OK;
80   
81 +     put_reedit_in_typebuf();
82       if (colon)
83         retval = ins_typebuf((char_u *)"\n", REMAP_YES, 0, TRUE, FALSE);
84       if (retval == OK)
85 *** ../vim-6.2.492/src/version.c        Fri Apr 23 12:02:42 2004
86 --- src/version.c       Fri Apr 23 15:16:05 2004
87 ***************
88 *** 639,640 ****
89 --- 639,642 ----
90   {   /* Add new patch number below this line */
91 + /**/
92 +     493,
93   /**/
94
95 -- 
96 The average life of an organization chart is six months.  You can safely
97 ignore any order from your boss that would take six months to complete.
98                                 (Scott Adams - The Dilbert principle)
99
100  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
101 ///        Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
102 \\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
103  \\\  Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
This page took 0.030381 seconds and 3 git commands to generate.