1 To: vim_dev@googlegroups.com
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: CTRL-] in Insert mode does not expand abbreviation when used in a
12 mapping. (Yichao Zhou)
13 Solution: Special case using CTRL-]. (Christian Brabandt)
14 Files: src/getchar.c, src/edit.c
17 *** ../vim-7.3.488/src/getchar.c 2012-02-05 22:05:44.000000000 +0100
18 --- src/getchar.c 2012-04-05 15:54:00.000000000 +0200
22 if (typebuf.tb_no_abbr_cnt) /* abbrev. are not recursive */
24 ! if ((KeyNoremap & (RM_NONE|RM_SCRIPT)) != 0)
25 ! /* no remapping implies no abbreviation */
31 if (typebuf.tb_no_abbr_cnt) /* abbrev. are not recursive */
34 ! /* no remapping implies no abbreviation, except for CTRL-] */
35 ! if ((KeyNoremap & (RM_NONE|RM_SCRIPT)) != 0 && c != Ctrl_RSB)
39 *** ../vim-7.3.488/src/edit.c 2012-02-29 18:22:03.000000000 +0100
40 --- src/edit.c 2012-04-05 15:57:46.000000000 +0200
43 Insstart_blank_vcol = get_nolist_virtcol();
46 ! if (vim_iswordc(c) || !echeck_abbr(
48 /* Add ABBR_OFF for characters above 0x100, this is
49 * what check_abbr() expects. */
50 (has_mbyte && c >= 0x100) ? (c + ABBR_OFF) :
54 insert_special(c, FALSE, FALSE);
57 Insstart_blank_vcol = get_nolist_virtcol();
60 ! /* Insert a normal character and check for abbreviations on a
61 ! * special character. Let CTRL-] expand abbreviations without
63 ! if (vim_iswordc(c) || (!echeck_abbr(
65 /* Add ABBR_OFF for characters above 0x100, this is
66 * what check_abbr() expects. */
67 (has_mbyte && c >= 0x100) ? (c + ABBR_OFF) :
69 ! c) && c != Ctrl_RSB))
71 insert_special(c, FALSE, FALSE);
73 *** ../vim-7.3.488/src/version.c 2012-04-05 16:04:58.000000000 +0200
74 --- src/version.c 2012-04-05 16:06:12.000000000 +0200
78 { /* Add new patch number below this line */
84 Just think of all the things we haven't thought of yet.
86 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
87 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
88 \\\ an exciting new programming language -- http://www.Zimbu.org ///
89 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///