summaryrefslogtreecommitdiffstats
path: root/gvim/vim-7.2/7.2.346
blob: 479aac63604680615844192b32671189f1e3887f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
To: vim-dev@vim.org
Subject: Patch 7.2.346
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 7.2.346
Problem:    Repeating a command with @: causes a mapping to be applied twice.
Solution:   Do not remap characters inserted in the typeahead buffer. (Kana
	    Natsuno)
Files:	    src/ops.c


*** ../vim-7.2.345/src/ops.c	2010-01-19 14:59:14.000000000 +0100
--- src/ops.c	2010-01-19 13:04:46.000000000 +0100
***************
*** 1301,1310 ****
      }
  }
  
      static int
  put_in_typebuf(s, esc, colon, silent)
      char_u	*s;
!     int		esc;	    /* Escape CSI characters */
      int		colon;	    /* add ':' before the line */
      int		silent;
  {
--- 1301,1316 ----
      }
  }
  
+ /*
+  * Insert register contents "s" into the typeahead buffer, so that it will be
+  * executed again.
+  * When "esc" is TRUE it is to be taken literally: Escape CSI characters and
+  * no remapping.
+  */
      static int
  put_in_typebuf(s, esc, colon, silent)
      char_u	*s;
!     int		esc;
      int		colon;	    /* add ':' before the line */
      int		silent;
  {
***************
*** 1312,1318 ****
  
      put_reedit_in_typebuf(silent);
      if (colon)
! 	retval = ins_typebuf((char_u *)"\n", REMAP_YES, 0, TRUE, silent);
      if (retval == OK)
      {
  	char_u	*p;
--- 1318,1324 ----
  
      put_reedit_in_typebuf(silent);
      if (colon)
! 	retval = ins_typebuf((char_u *)"\n", REMAP_NONE, 0, TRUE, silent);
      if (retval == OK)
      {
  	char_u	*p;
***************
*** 1324,1335 ****
  	if (p == NULL)
  	    retval = FAIL;
  	else
! 	    retval = ins_typebuf(p, REMAP_YES, 0, TRUE, silent);
  	if (esc)
  	    vim_free(p);
      }
      if (colon && retval == OK)
! 	retval = ins_typebuf((char_u *)":", REMAP_YES, 0, TRUE, silent);
      return retval;
  }
  
--- 1330,1342 ----
  	if (p == NULL)
  	    retval = FAIL;
  	else
! 	    retval = ins_typebuf(p, esc ? REMAP_NONE : REMAP_YES,
! 							     0, TRUE, silent);
  	if (esc)
  	    vim_free(p);
      }
      if (colon && retval == OK)
! 	retval = ins_typebuf((char_u *)":", REMAP_NONE, 0, TRUE, silent);
      return retval;
  }
  
*** ../vim-7.2.345/src/version.c	2010-01-27 15:57:17.000000000 +0100
--- src/version.c	2010-01-27 16:25:55.000000000 +0100
***************
*** 683,684 ****
--- 683,686 ----
  {   /* Add new patch number below this line */
+ /**/
+     346,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
155. You forget to eat because you're too busy surfing the net.

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///