aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/terminal.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-09-29 17:09:37 +0200
committerJustin M. Keyes <justinkz@gmail.com>2016-10-02 00:24:49 +0200
commit6186df3562e33e92f04ed8c850204ceabc4746e1 (patch)
tree90cc5779b0ba395e1b07069573ddb836a7d9de1f /src/nvim/terminal.c
parentc8b6ec2e6a8599203b4cff762f148f62464d9725 (diff)
downloadrneovim-6186df3562e33e92f04ed8c850204ceabc4746e1.tar.gz
rneovim-6186df3562e33e92f04ed8c850204ceabc4746e1.tar.bz2
rneovim-6186df3562e33e92f04ed8c850204ceabc4746e1.zip
event/multiqueue.c: Rename "queue" to "multiqueue".
`lib/queue.h` implements a basic queue. `event/queue.c` implements a specialized data structure on top of lib/queue.h; it is not a "normal" queue. Rename the specialized multi-level queue implemented in event/queue.c to "multiqueue", to avoid confusion when reading the code. Before this change one can eventually notice that "macros (uppercase symbols) are for the normal queue, lowercase operations are for the multi-level queue", but that is unnecessary friction for new developers (or existing developers just visiting this part of the codebase).
Diffstat (limited to 'src/nvim/terminal.c')
-rw-r--r--src/nvim/terminal.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c
index ff98dc9f22..8401343d7a 100644
--- a/src/nvim/terminal.c
+++ b/src/nvim/terminal.c
@@ -166,7 +166,7 @@ void terminal_init(void)
invalidated_terminals = pmap_new(ptr_t)();
time_watcher_init(&main_loop, &refresh_timer, NULL);
// refresh_timer_cb will redraw the screen which can call vimscript
- refresh_timer.events = queue_new_child(main_loop.events);
+ refresh_timer.events = multiqueue_new_child(main_loop.events);
// initialize a rgb->color index map for cterm attributes(VTermScreenCell
// only has RGB information and we need color indexes for terminal UIs)
@@ -201,7 +201,7 @@ void terminal_init(void)
void terminal_teardown(void)
{
time_watcher_stop(&refresh_timer);
- queue_free(refresh_timer.events);
+ multiqueue_free(refresh_timer.events);
time_watcher_close(&refresh_timer, NULL);
pmap_free(ptr_t)(invalidated_terminals);
map_free(int, int)(color_indexes);
@@ -445,7 +445,7 @@ static int terminal_execute(VimState *state, int key)
case K_EVENT:
// We cannot let an event free the terminal yet. It is still needed.
s->term->refcount++;
- queue_process_events(main_loop.events);
+ multiqueue_process_events(main_loop.events);
s->term->refcount--;
if (s->term->buf_handle == 0) {
s->close = true;