diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-12-05 20:43:17 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-12-05 20:43:17 +0000 |
commit | cf8e7d14aa79066f4b539abdb467ac2e391271dd (patch) | |
tree | c929a4d2f34c35d430fa4088a389826b04c8adf9 /src/getchar.c | |
parent | 9c4b4ab3a60b34bf22d3b61ddcf781b6b112d219 (diff) | |
download | vim-cf8e7d14aa79066f4b539abdb467ac2e391271dd.zip |
updated for version 7.0-177
Diffstat (limited to 'src/getchar.c')
-rw-r--r-- | src/getchar.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/getchar.c b/src/getchar.c index e623ce666..670520278 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -76,7 +76,7 @@ static int maphash_valid = FALSE; */ static mapblock_T *first_abbr = NULL; /* first entry in abbrlist */ -static int KeyNoremap = FALSE; /* remapping disabled */ +static int KeyNoremap = 0; /* remapping flags */ /* * variables used by vgetorpeek() and flush_buffers() @@ -1035,6 +1035,8 @@ ins_typebuf(str, noremap, offset, nottyped, silent) /* * Put character "c" back into the typeahead buffer. * Can be used for a character obtained by vgetc() that needs to be put back. + * Uses cmd_silent, KeyTyped and KeyNoremap to restore the flags belonging to + * the char. */ void ins_char_typebuf(c) @@ -1061,7 +1063,7 @@ ins_char_typebuf(c) buf[1] = NUL; #endif } - (void)ins_typebuf(buf, REMAP_YES, 0, !KeyTyped, FALSE); + (void)ins_typebuf(buf, KeyNoremap, 0, !KeyTyped, cmd_silent); } /* @@ -2270,9 +2272,8 @@ vgetorpeek(advance) gotchars(typebuf.tb_buf + typebuf.tb_off, 1); } - KeyNoremap = (typebuf.tb_noremap[ - typebuf.tb_off] - & (RM_NONE|RM_SCRIPT)); + KeyNoremap = typebuf.tb_noremap[ + typebuf.tb_off]; del_typebuf(1, 0); } break; /* got character, break for loop */ @@ -4196,7 +4197,8 @@ check_abbr(c, ptr, col, mincol) if (typebuf.tb_no_abbr_cnt) /* abbrev. are not recursive */ return FALSE; - if (KeyNoremap) /* no remapping implies no abbreviation */ + if ((KeyNoremap & (RM_NONE|RM_SCRIPT)) != 0) + /* no remapping implies no abbreviation */ return FALSE; /* |