Mercurial > vim
comparison src/os_unix.c @ 14673:f1b7d308de2f v8.1.0349
patch 8.1.0349: crash when wiping buffer in a callback
commit https://github.com/vim/vim/commit/ed5a9d661248a2160368f1b0ab3a1bf74831db04
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Sep 6 13:14:43 2018 +0200
patch 8.1.0349: crash when wiping buffer in a callback
Problem: Crash when wiping buffer in a callback.
Solution: Do not handle messages when only peeking for a character.
(closes #2107) Add "redraw_flag" to test_override().
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 06 Sep 2018 13:15:05 +0200 |
parents | 2c9a467c82fa |
children | cf33c47d66aa |
comparison
equal
deleted
inserted
replaced
14672:a4786c02f58f | 14673:f1b7d308de2f |
---|---|
415 * columns=99" command was used. */ | 415 * columns=99" command was used. */ |
416 while (do_resize) | 416 while (do_resize) |
417 handle_resize(); | 417 handle_resize(); |
418 | 418 |
419 #ifdef MESSAGE_QUEUE | 419 #ifdef MESSAGE_QUEUE |
420 parse_queued_messages(); | 420 // Only process messages when waiting. |
421 /* If input was put directly in typeahead buffer bail out here. */ | 421 if (wtime != 0) |
422 if (typebuf_changed(tb_change_cnt)) | 422 { |
423 return 0; | 423 parse_queued_messages(); |
424 // If input was put directly in typeahead buffer bail out here. | |
425 if (typebuf_changed(tb_change_cnt)) | |
426 return 0; | |
427 } | |
424 #endif | 428 #endif |
425 if (wtime < 0 && did_start_blocking) | 429 if (wtime < 0 && did_start_blocking) |
426 /* blocking and already waited for p_ut */ | 430 /* blocking and already waited for p_ut */ |
427 wait_time = -1; | 431 wait_time = -1; |
428 else | 432 else |