comparison src/getchar.c @ 19627:6b1564fcab92 v8.2.0370

patch 8.2.0370: the typebuf_was_filled flag is sometimes not reset Commit: https://github.com/vim/vim/commit/e49b4bb89505fad28cf89f0891aef3e2d397919e Author: Bram Moolenaar <Bram@vim.org> Date: Wed Mar 11 13:01:40 2020 +0100 patch 8.2.0370: the typebuf_was_filled flag is sometimes not reset Problem: The typebuf_was_filled flag is sometimes not reset, which may cause a hang. Solution: Make sure typebuf_was_filled is reset when the typeahead buffer is empty.
author Bram Moolenaar <Bram@vim.org>
date Wed, 11 Mar 2020 13:15:04 +0100
parents 5eb0ead1415f
children dcec86d796bc
comparison
equal deleted inserted replaced
19626:86e69ebd8460 19627:6b1564fcab92
419 if (flush_typeahead == FLUSH_MINIMAL) 419 if (flush_typeahead == FLUSH_MINIMAL)
420 { 420 {
421 // remove mapped characters at the start only 421 // remove mapped characters at the start only
422 typebuf.tb_off += typebuf.tb_maplen; 422 typebuf.tb_off += typebuf.tb_maplen;
423 typebuf.tb_len -= typebuf.tb_maplen; 423 typebuf.tb_len -= typebuf.tb_maplen;
424 #if defined(FEAT_CLIENTSERVER) || defined(FEAT_EVAL)
425 if (typebuf.tb_len == 0)
426 typebuf_was_filled = FALSE;
427 #endif
424 } 428 }
425 else 429 else
426 { 430 {
427 // remove typeahead 431 // remove typeahead
428 if (flush_typeahead == FLUSH_INPUT) 432 if (flush_typeahead == FLUSH_INPUT)
1281 typebuf.tb_maplen = 0; 1285 typebuf.tb_maplen = 0;
1282 typebuf.tb_silent = 0; 1286 typebuf.tb_silent = 0;
1283 typebuf.tb_no_abbr_cnt = 0; 1287 typebuf.tb_no_abbr_cnt = 0;
1284 if (++typebuf.tb_change_cnt == 0) 1288 if (++typebuf.tb_change_cnt == 0)
1285 typebuf.tb_change_cnt = 1; 1289 typebuf.tb_change_cnt = 1;
1290 #if defined(FEAT_CLIENTSERVER) || defined(FEAT_EVAL)
1291 typebuf_was_filled = FALSE;
1292 #endif
1286 return OK; 1293 return OK;
1287 } 1294 }
1288 1295
1289 /* 1296 /*
1290 * Free the buffers of "typebuf". 1297 * Free the buffers of "typebuf".