Mercurial > vim
comparison src/edit.c @ 3448:c1a6e1745cb5 v7.3.489
updated for version 7.3.489
Problem: CTRL-] in Insert mode does not expand abbreviation when used in a
mapping. (Yichao Zhou)
Solution: Special case using CTRL-]. (Christian Brabandt)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Thu, 05 Apr 2012 16:07:06 +0200 |
parents | de60f6fa3d8d |
children | 75037f9bc97a |
comparison
equal
deleted
inserted
replaced
3447:5d2bbb05be1b | 3448:c1a6e1745cb5 |
---|---|
1453 if (Insstart_blank_vcol == MAXCOL | 1453 if (Insstart_blank_vcol == MAXCOL |
1454 && curwin->w_cursor.lnum == Insstart.lnum) | 1454 && curwin->w_cursor.lnum == Insstart.lnum) |
1455 Insstart_blank_vcol = get_nolist_virtcol(); | 1455 Insstart_blank_vcol = get_nolist_virtcol(); |
1456 } | 1456 } |
1457 | 1457 |
1458 if (vim_iswordc(c) || !echeck_abbr( | 1458 /* Insert a normal character and check for abbreviations on a |
1459 * special character. Let CTRL-] expand abbreviations without | |
1460 * inserting it. */ | |
1461 if (vim_iswordc(c) || (!echeck_abbr( | |
1459 #ifdef FEAT_MBYTE | 1462 #ifdef FEAT_MBYTE |
1460 /* Add ABBR_OFF for characters above 0x100, this is | 1463 /* Add ABBR_OFF for characters above 0x100, this is |
1461 * what check_abbr() expects. */ | 1464 * what check_abbr() expects. */ |
1462 (has_mbyte && c >= 0x100) ? (c + ABBR_OFF) : | 1465 (has_mbyte && c >= 0x100) ? (c + ABBR_OFF) : |
1463 #endif | 1466 #endif |
1464 c)) | 1467 c) && c != Ctrl_RSB)) |
1465 { | 1468 { |
1466 insert_special(c, FALSE, FALSE); | 1469 insert_special(c, FALSE, FALSE); |
1467 #ifdef FEAT_RIGHTLEFT | 1470 #ifdef FEAT_RIGHTLEFT |
1468 revins_legal++; | 1471 revins_legal++; |
1469 revins_chars++; | 1472 revins_chars++; |