mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 13:38:34 +00:00
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).
This commit is contained in:
@@ -35,8 +35,8 @@ getkey:
|
||||
// processing. Characters can come from mappings, scripts and other
|
||||
// sources, so this scenario is very common.
|
||||
key = safe_vgetc();
|
||||
} else if (!queue_empty(main_loop.events)) {
|
||||
// Event was made available after the last queue_process_events call
|
||||
} else if (!multiqueue_empty(main_loop.events)) {
|
||||
// Event was made available after the last multiqueue_process_events call
|
||||
key = K_EVENT;
|
||||
} else {
|
||||
input_enable_events();
|
||||
@@ -48,7 +48,7 @@ getkey:
|
||||
// directly.
|
||||
(void)os_inchar(NULL, 0, -1, 0);
|
||||
input_disable_events();
|
||||
key = !queue_empty(main_loop.events) ? K_EVENT : safe_vgetc();
|
||||
key = !multiqueue_empty(main_loop.events) ? K_EVENT : safe_vgetc();
|
||||
}
|
||||
|
||||
if (key == K_EVENT) {
|
||||
|
Reference in New Issue
Block a user