]> git.pld-linux.org Git - packages/vim.git/blob - 7.3.338
- new
[packages/vim.git] / 7.3.338
1 To: vim_dev@googlegroups.com
2 Subject: Patch 7.3.338
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.338
11 Problem:    Using getchar() in an expression mapping doesn't work well.
12 Solution:   Don't save and restore the typeahead. (James Vega)
13 Files:      src/getchar.c, src/testdir/test34.ok
14
15
16 *** ../vim-7.3.337/src/getchar.c        2011-08-17 20:33:18.000000000 +0200
17 --- src/getchar.c       2011-10-12 21:53:27.000000000 +0200
18 ***************
19 *** 2460,2486 ****
20   
21                         /*
22                          * Handle ":map <expr>": evaluate the {rhs} as an
23 !                        * expression.  Save and restore the typeahead so that
24 !                        * getchar() can be used.  Also save and restore the
25 !                        * command line for "normal :".
26                          */
27                         if (mp->m_expr)
28                         {
29 -                           tasave_T    tabuf;
30                             int         save_vgetc_busy = vgetc_busy;
31   
32 !                           save_typeahead(&tabuf);
33 !                           if (tabuf.typebuf_valid)
34 !                           {
35 !                               vgetc_busy = 0;
36 !                               save_m_keys = vim_strsave(mp->m_keys);
37 !                               save_m_str = vim_strsave(mp->m_str);
38 !                               s = eval_map_expr(save_m_str, NUL);
39 !                               vgetc_busy = save_vgetc_busy;
40 !                           }
41 !                           else
42 !                               s = NULL;
43 !                           restore_typeahead(&tabuf);
44                         }
45                         else
46   #endif
47 --- 2460,2477 ----
48   
49                         /*
50                          * Handle ":map <expr>": evaluate the {rhs} as an
51 !                        * expression.  Also save and restore the command line
52 !                        * for "normal :".
53                          */
54                         if (mp->m_expr)
55                         {
56                             int         save_vgetc_busy = vgetc_busy;
57   
58 !                           vgetc_busy = 0;
59 !                           save_m_keys = vim_strsave(mp->m_keys);
60 !                           save_m_str = vim_strsave(mp->m_str);
61 !                           s = eval_map_expr(save_m_str, NUL);
62 !                           vgetc_busy = save_vgetc_busy;
63                         }
64                         else
65   #endif
66 *** ../vim-7.3.337/src/testdir/test34.ok        2010-08-15 21:57:29.000000000 +0200
67 --- src/testdir/test34.ok       2011-10-12 21:59:39.000000000 +0200
68 ***************
69 *** 1,5 ****
70   xxx4asdf fail nop ok 9 333
71 ! XX111XX
72   ---222---
73   1. one
74   2. two
75 --- 1,5 ----
76   xxx4asdf fail nop ok 9 333
77 ! XX111-XX
78   ---222---
79   1. one
80   2. two
81 *** ../vim-7.3.337/src/version.c        2011-10-12 21:04:15.000000000 +0200
82 --- src/version.c       2011-10-12 21:20:31.000000000 +0200
83 ***************
84 *** 711,712 ****
85 --- 711,714 ----
86   {   /* Add new patch number below this line */
87 + /**/
88 +     338,
89   /**/
90
91 -- 
92 hundred-and-one symptoms of being an internet addict:
93 65. The last time you looked at the clock it was 11:30pm, and in what
94     seems like only a few seconds later, your sister runs past you to
95     catch her 7am school bus.
96
97  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
98 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
99 \\\  an exciting new programming language -- http://www.Zimbu.org        ///
100  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.031876 seconds and 3 git commands to generate.