diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-01-10 13:51:09 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-01-10 13:51:09 +0100 |
commit | caa55b65c204946d160c1b743c5f8f3b506dc4d3 (patch) | |
tree | 3dd961455a51a51c70020597080d9014aa37366b /src/getchar.c | |
parent | 68563937f58ea2dc31b58739336c383d2fd7e6cf (diff) | |
download | vim-git-caa55b65c204946d160c1b743c5f8f3b506dc4d3.tar.gz |
patch 8.0.0164: outdated and misplaced commentsv8.0.0164
Problem: Outdated and misplaced comments.
Solution: Fix the comments.
Diffstat (limited to 'src/getchar.c')
-rw-r--r-- | src/getchar.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/getchar.c b/src/getchar.c index 3657433a5..9adeafa5b 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -978,23 +978,22 @@ ins_typebuf( addlen = (int)STRLEN(str); - /* - * Easy case: there is room in front of typebuf.tb_buf[typebuf.tb_off] - */ if (offset == 0 && addlen <= typebuf.tb_off) { + /* + * Easy case: there is room in front of typebuf.tb_buf[typebuf.tb_off] + */ typebuf.tb_off -= addlen; mch_memmove(typebuf.tb_buf + typebuf.tb_off, str, (size_t)addlen); } - - /* - * 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. - */ else { + /* + * 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. + */ newoff = MAXMAPLEN + 4; newlen = typebuf.tb_len + addlen + newoff + 4 * (MAXMAPLEN + 4); if (newlen < 0) /* string is getting too long */ @@ -2009,7 +2008,7 @@ vgetorpeek(int advance) { /* KeyTyped = FALSE; When the command that stuffed something * was typed, behave like the stuffed command was typed. - * needed for CTRL-W CTRl-] to open a fold, for example. */ + * needed for CTRL-W CTRL-] to open a fold, for example. */ KeyStuffed = TRUE; } if (typebuf.tb_no_abbr_cnt == 0) |