diff options
author | Bram Moolenaar <Bram@vim.org> | 2007-05-06 11:56:32 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2007-05-06 11:56:32 +0000 |
commit | 4e86cbab2734e8c735e9fd03f03aa12fc95561eb (patch) | |
tree | 6c669e71ce8f74c21c106cceca31632afc6cc2ee /src/getchar.c | |
parent | 044defef0624e36562590f8d6f19c5b7daf91aff (diff) | |
download | vim-git-4e86cbab2734e8c735e9fd03f03aa12fc95561eb.tar.gz |
updated for version 7.1a
Diffstat (limited to 'src/getchar.c')
-rw-r--r-- | src/getchar.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/getchar.c b/src/getchar.c index 912c0d22a..c265a6f00 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -225,7 +225,7 @@ get_inserted() } /* - * add string "s" after the current block of buffer "buf" + * Add string "s" after the current block of buffer "buf". * K_SPECIAL and CSI should have been escaped already. */ static void @@ -928,6 +928,7 @@ ins_typebuf(str, noremap, offset, nottyped, silent) typebuf.tb_change_cnt = 1; addlen = (int)STRLEN(str); + /* * Easy case: there is room in front of typebuf.tb_buf[typebuf.tb_off] */ @@ -936,8 +937,9 @@ ins_typebuf(str, noremap, offset, nottyped, silent) typebuf.tb_off -= addlen; mch_memmove(typebuf.tb_buf + typebuf.tb_off, str, (size_t)addlen); } + /* - * Need to allocate new buffer. + * Need to allocate a new buffer. * In typebuf.tb_buf there must always be room for 3 * MAXMAPLEN + 4 * characters. We add some extra room to avoid having to allocate too * often. @@ -1191,19 +1193,21 @@ del_typebuf(len, offset) * If recording is on put the character in the recordbuffer. */ static void -gotchars(s, len) - char_u *s; +gotchars(chars, len) + char_u *chars; int len; { + char_u *s = chars; int c; char_u buf[2]; + int todo = len; /* remember how many chars were last recorded */ if (Recording) last_recorded_len += len; buf[1] = NUL; - while (len--) + while (todo--) { /* Handle one byte at a time; no translation to be done. */ c = *s++; |