Mercurial > vim
diff src/getchar.c @ 10549:055b1633aed7 v8.0.0164
patch 8.0.0164: outdated and misplaced comments
commit https://github.com/vim/vim/commit/caa55b65c204946d160c1b743c5f8f3b506dc4d3
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jan 10 13:51:09 2017 +0100
patch 8.0.0164: outdated and misplaced comments
Problem: Outdated and misplaced comments.
Solution: Fix the comments.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 10 Jan 2017 14:00:04 +0100 |
parents | 66f1b5bf3fa6 |
children | 27be410d6d29 |
line wrap: on
line diff
--- 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)