]> git.pld-linux.org Git - packages/vim.git/blob - 7.3.168
- new
[packages/vim.git] / 7.3.168
1 To: vim_dev@googlegroups.com
2 Subject: Patch 7.3.168
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.168
11 Problem:    When the second argument of input() contains a CR the text up to
12             that is used without asking the user. (Yasuhiro Matsumoto)
13 Solution:   Change CR, NL and ESC in the text to a space.
14 Files:      src/getchar.c
15
16
17 *** ../vim-7.3.167/src/getchar.c        2011-03-22 13:07:19.000000000 +0100
18 --- src/getchar.c       2011-04-28 14:50:26.000000000 +0200
19 ***************
20 *** 635,645 ****
21 --- 635,648 ----
22   /*
23    * Stuff "s" into the stuff buffer, leaving special key codes unmodified and
24    * escaping other K_SPECIAL and CSI bytes.
25 +  * Change CR, LF and ESC into a space.
26    */
27       void
28   stuffReadbuffSpec(s)
29       char_u    *s;
30   {
31 +     int c;
32
33       while (*s != NUL)
34       {
35         if (*s == K_SPECIAL && s[1] != NUL && s[2] != NUL)
36 ***************
37 *** 649,659 ****
38             s += 3;
39         }
40         else
41   #ifdef FEAT_MBYTE
42 !           stuffcharReadbuff(mb_ptr2char_adv(&s));
43   #else
44 !           stuffcharReadbuff(*s++);
45   #endif
46       }
47   }
48   #endif
49 --- 652,667 ----
50             s += 3;
51         }
52         else
53 +       {
54   #ifdef FEAT_MBYTE
55 !           c = mb_ptr2char_adv(&s);
56   #else
57 !           c = *s++;
58   #endif
59 +           if (c == CAR || c == NL || c == ESC)
60 +               c = ' ';
61 +           stuffcharReadbuff(c);
62 +       }
63       }
64   }
65   #endif
66 *** ../vim-7.3.167/src/version.c        2011-04-28 17:27:05.000000000 +0200
67 --- src/version.c       2011-04-28 17:28:36.000000000 +0200
68 ***************
69 *** 716,717 ****
70 --- 716,719 ----
71   {   /* Add new patch number below this line */
72 + /**/
73 +     168,
74   /**/
75
76 -- 
77 Everyone has a photographic memory. Some don't have film.
78
79  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
80 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
81 \\\  an exciting new programming language -- http://www.Zimbu.org        ///
82  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.032747 seconds and 3 git commands to generate.