diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2015-09-15 08:12:55 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2015-09-18 14:35:26 -0300 |
commit | 47cbbc0b8c864bdb1aaa572f0396642e2c66deae (patch) | |
tree | 005f4500ee591246658087cc4f9bc93eef928536 /src/nvim/terminal.c | |
parent | 1f90cbb4aed1eb047b36eb4b41e2ad02f9ae3a4f (diff) | |
download | rneovim-47cbbc0b8c864bdb1aaa572f0396642e2c66deae.tar.gz rneovim-47cbbc0b8c864bdb1aaa572f0396642e2c66deae.tar.bz2 rneovim-47cbbc0b8c864bdb1aaa572f0396642e2c66deae.zip |
terminal: Run screen refresh timer in a deferred queue
Close #3332
Diffstat (limited to 'src/nvim/terminal.c')
-rw-r--r-- | src/nvim/terminal.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c index 028c956f3c..360f8786e9 100644 --- a/src/nvim/terminal.c +++ b/src/nvim/terminal.c @@ -155,6 +155,8 @@ void terminal_init(void) { invalidated_terminals = pmap_new(ptr_t)(); time_watcher_init(&loop, &refresh_timer, NULL); + // refresh_timer_cb will redraw the screen which can call vimscript + refresh_timer.events = queue_new_child(loop.events); // initialize a rgb->color index map for cterm attributes(VTermScreenCell // only has RGB information and we need color indexes for terminal UIs) @@ -180,6 +182,7 @@ void terminal_init(void) void terminal_teardown(void) { time_watcher_stop(&refresh_timer); + queue_free(refresh_timer.events); time_watcher_close(&refresh_timer, NULL); pmap_free(ptr_t)(invalidated_terminals); map_free(int, int)(color_indexes); |