Mercurial > vim
comparison src/ui.c @ 15075:fd9c4b1a71aa v8.1.0548
patch 8.1.0548: crash when job callback unloads a buffer
commit https://github.com/vim/vim/commit/1341024e0823d9aa9cde08d6b55e12f2d90ff778
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Nov 26 21:19:11 2018 +0100
patch 8.1.0548: crash when job callback unloads a buffer
Problem: Crash when job callback unloads a buffer. (James McCoy)
Solution: Don't round up the wait time to 10 msec in ui_inchar().
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 26 Nov 2018 21:30:07 +0100 |
parents | 35c2d164a630 |
children | 440e5071f3f8 |
comparison
equal
deleted
inserted
replaced
15074:9c1c1c332df0 | 15075:fd9c4b1a71aa |
---|---|
152 if (no_console_input()) | 152 if (no_console_input()) |
153 { | 153 { |
154 static int count = 0; | 154 static int count = 0; |
155 | 155 |
156 # ifndef NO_CONSOLE | 156 # ifndef NO_CONSOLE |
157 retval = mch_inchar(buf, maxlen, (wtime >= 0 && wtime < 10) | 157 retval = mch_inchar(buf, maxlen, wtime, tb_change_cnt); |
158 ? 10L : wtime, tb_change_cnt); | |
159 if (retval > 0 || typebuf_changed(tb_change_cnt) || wtime >= 0) | 158 if (retval > 0 || typebuf_changed(tb_change_cnt) || wtime >= 0) |
160 goto theend; | 159 goto theend; |
161 # endif | 160 # endif |
162 if (wtime == -1 && ++count == 1000) | 161 if (wtime == -1 && ++count == 1000) |
163 read_error_exit(); | 162 read_error_exit(); |