diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2024-09-10 01:14:18 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-10 01:14:18 -0700 |
| commit | 5d7853f22903a4f42d52f565f6a662c3ef178a8c (patch) | |
| tree | 9329edaa4dc694186644a5a9e3f405eb365e8ae8 /src/nvim/event | |
| parent | f279d1ae33ee5650bccf7b52f9f29fd192ccea1d (diff) | |
| download | rneovim-5d7853f22903a4f42d52f565f6a662c3ef178a8c.tar.gz rneovim-5d7853f22903a4f42d52f565f6a662c3ef178a8c.tar.bz2 rneovim-5d7853f22903a4f42d52f565f6a662c3ef178a8c.zip | |
refactor(os/input.c): rename os_inchar => input_get #30327
Problem:
The name `os_inchar` (from Vim's old `mch_inchar`) is ambiguous:
"inchar" sounds like it could be reading or enqueuing (setting) input.
Its docstring is also ambiguous.
Solution:
- Rename `os_inchar` to `input_get`.
- Write some mf'ing docstrings.
- Add assert() in TRY_READ().
Diffstat (limited to 'src/nvim/event')
| -rw-r--r-- | src/nvim/event/loop.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/nvim/event/loop.h b/src/nvim/event/loop.h index 6ecc7cb781..da4852b836 100644 --- a/src/nvim/event/loop.h +++ b/src/nvim/event/loop.h @@ -16,15 +16,14 @@ struct loop { uv_loop_t uv; MultiQueue *events; MultiQueue *thread_events; - // Immediate events: - // "Processed after exiting uv_run() (to avoid recursion), but before - // returning from loop_poll_events()." 502aee690c98 - // Practical consequence (for main_loop): these events are processed by - // state_enter()..os_inchar() - // whereas "regular" events (main_loop.events) are processed by - // state_enter()..VimState.execute() - // But state_enter()..os_inchar() can be "too early" if you want the event - // to trigger UI updates and other user-activity-related side-effects. + // Immediate events. + // - "Processed after exiting `uv_run()` (to avoid recursion), but before returning from + // `loop_poll_events()`." 502aee690c98 + // - Practical consequence (for `main_loop`): + // - these are processed by `state_enter()..input_get()` whereas "regular" events + // (`main_loop.events`) are processed by `state_enter()..VimState.execute()` + // - `state_enter()..input_get()` can be "too early" if you want the event to trigger UI + // updates and other user-activity-related side-effects. MultiQueue *fast_events; // used by process/job-control subsystem |