aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ui_client.c
Commit message (Collapse)AuthorAge
* refactor: fix includes for api/autocmd.hdundargoc2023-11-27
|
* build(IWYU): fix includes for func_attr.hdundargoc2023-11-27
|
* build(IWYU): replace public-to-public mappings with pragmas (#26237)zeertzjq2023-11-27
|
* docs: deprecate the "term_background" UI fieldGregory Anders2023-11-13
|
* build: remove PVSdundargoc2023-11-12
| | | | | | | We already have an extensive suite of static analysis tools we use, which causes a fair bit of redundancy as we get duplicate warnings. PVS is also prone to give false warnings which creates a lot of work to identify and disable.
* build(iwyu): add a few more _defs.h mappings (#25435)zeertzjq2023-09-30
|
* fix(startup): run embedded Nvim with real path (#24282)zeertzjq2023-07-08
| | | fix(startup): run embedded process with real path
* Merge pull request #23891 from rickyz/grid_line_flagsbfredl2023-07-03
|\ | | | | fix(ui): propagate line flags on grid_line events
| * fix(ui): propagate line wrapping state on grid_line eventsRicky Zhou2023-06-05
| | | | | | | | | | | | This fixes the TUI's line-wrapping behavior, which was broken with the migration to the msgpack-based UI protocol (see https://github.com/neovim/neovim/issues/7369#issuecomment-1571812273).
* | fix(tui): v:argv does not report the original argv[0] #24015t0muxx2023-06-14
|/ | | | | | | | | | Problem: Since TUI was moved to another process 24488169564c39a506c235bf6a33b8e23a8cb528 v:argv and v:progname don't report the original argv[0]. ["/usr/bin/nvim", "--embed", ...] Solution: Use argv[0] instead of VV_PROGPATH in ui_client_start_server(). Fix #23953
* refactor(api): new helper macrosFamiu Haque2023-05-23
| | | | Adds new API helper macros `CSTR_AS_OBJ()`, `STATIC_CSTR_AS_OBJ()`, and `STATIC_CSTR_TO_OBJ()`, which cleans up a lot of the current code. These macros will also be used extensively in the upcoming option refactor PRs because then API Objects will be used to get/set options. This PR also modifies pre-existing code to use old API helper macros like `CSTR_TO_OBJ()` to make them cleaner.
* refactor: revert incorrect change to ui_client.c codebfredl2023-04-21
| | | | | | | | | - There is no "resource leak". - "return 0" is definitely not the correct behavior if we ever occur a platform where this would fail. - There was no problem here to fix. so let's not "fix" it. - once CI is upgraded to gcc 13, we'll figure out the correct way to make it shut the fuck up. warnings on non-ci platforms are not critical.
* fix(ui_client): check return code of dup()Andreas Schneider2023-04-21
| | | | | | | gsrc/nvim/ui_client.c: In function ‘ui_client_start_server’: gsrc/nvim/ui_client.c:68:5: warning: ignoring return value of ‘dup’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 68 | dup(stderr_isatty ? STDERR_FILENO : STDOUT_FILENO); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* refactor: remove redundant const char * castsii142023-04-07
|
* feat(api): more fields in nvim_list_uisJustin M. Keyes2023-02-27
| | | | | | | | Problem: nvim_list_uis does not report all ":help ui-option" fields. Solution: Store ":help ui-option" fields on the `UI` object and update ui_array.
* docs: fix typos (#22353)zeertzjq2023-02-22
|
* fix(tui): only forward stdin_fd on first attach (#22293)zeertzjq2023-02-17
|
* fix(tui): exit on input eofzeertzjq2023-02-14
|
* build: enable MSVC level 3 warnings (#21934)dundargoc2023-02-11
| | | | | | MSVC has 4 different warning levels: 1 (severe), 2 (significant), 3 (production quality) and 4 (informational). Enabling level 3 warnings mostly revealed conversion problems, similar to GCC/clang -Wconversion flag.
* refactor(exit): pass error message to preserve_exit() (#22097)zeertzjq2023-02-04
| | | | | | | | | | | | | | | Problem: 1. Some calls to preserve_exit() don't put a message in IObuff, so the IObuff printed by preserve_exit() contains unrelated information. 2. If a TUI client runs out of memory or receives a deadly signal, the error message is shown on alternate screen and cannot be easily seen because the TUI exits alternate screen soon afterwards. Solution: Pass error message to preserve_exit() and exit alternate screen before printing it. Note that this doesn't fix the problem that server error messages cannot be easily seen on exit. This is tracked in #21608 and #21843.
* fix(tui): detach/attach on suspend/resume (#22040)zeertzjq2023-02-02
| | | | | | | | | | | | | | | | | | Problem: When a TUI client is suspended it still receives UI events from the server, and has to process these accumulated events when it is resumed. With mulitple TUI clients this is a bigger problem, considering the following steps: 1. A TUI client is attached. 2. CTRL-Z is pressed and the first client is suspended. 3. Another TUI client is attached. 4. CTRL-Z is pressed and a "suspend" event is sent to both clients. The second client is suspended, while the first client isn't able to process the event because it has already been suspended. 5. The first client is resumed. It processes the accumulated "suspend" event and suspends immediately. Solution: Make a TUI client detach on suspend and re-attach on resume.
* fix(unittests): fix TUI broken test previously ignoredbfredl2023-01-18
|
* Merge pull request #21831 from bfredl/nofdbfredl2023-01-16
|\ | | | | fix(ui): re-organize tty fd handling and fix issues
| * fix(ui): re-organize tty fd handling and fix issuesbfredl2023-01-16
| | | | | | | | | | | | | | - Use the correct fd to replace stdin on windows (CONIN) - Don't start the TUI if there are no tty fd (not a regression, but makes sense regardless) - De-mythologize "global input fd". it is just STDIN.
* | refactor: fix IWYU mapping file and use IWYU (#21802)dundargoc2023-01-15
|/ | | Also add the EXITFREE definition to main_lib rather than the nvim target, as the header generation needs the EXITFREE flag to work properly.
* fix(embed): handle stdio in server properlybfredl2023-01-09
| | | | | Rename stdin/stdout in the server, so that RPC data won't get corrupted. This also restores the use of stderr to write directly to the terminal.
* refactor(ui): devirtualize the ui layerbfredl2023-01-05
| | | | | | | | | | | | | | | | | - The defined interface for the UI is only the RPC protocol. The original UI interface as an array of function pointers fill no function. - On the server, all the UI:s are all RPC channels. - ui.c is only used on the server. - The compositor is a preprocessing step for single-grid UI:s - on the client, ui_client and tui talk directly to each other - we still do module separation, as ui_client.c could form the basis of a libnvim client module later. Items for later PR:s - vim.ui_attach is still an unhappy child, reconsider based on plugin experience. - the flags in ui_events.in.h are still a mess. Can be simplified now. - UX for remote attachment needs more work. - startup for client can be simplified further (think of the millisecs we can save)
* refactor(api): do not allocate temporaries for internal eventsbfredl2023-01-03
|
* fix(tui): more work in the TUIbfredl2022-12-31
|
* feat(tui): run TUI as external processhlpr982022-12-31
|
* build: allow IWYU to fix includes for all .c filesdundargoc2022-11-15
| | | | | | | | | | Allow Include What You Use to remove unnecessary includes and only include what is necessary. This helps with reducing compilation times and makes it easier to visualise which dependencies are actually required. Work on https://github.com/neovim/neovim/issues/549, but doesn't close it since this only works fully for .c files and not headers.
* perf(api): allow to use an arena for return valuesbfredl2022-08-23
|
* docs: fix typos (#19588)dundargoc2022-08-03
| | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: notomo <notomo.motono@gmail.com>
* perf(ui): unpack grid_line (screen contents) directlybfredl2022-07-19
|
* perf(ui): unpack a single ui event at a time, instead of a "redraw" batchbfredl2022-07-18
| | | | | This reduces the memory overhead for large redraw batches, as a much smaller prefix of the api object buffer is used and needs to be hot in cache.
* refactor(api): use hashy hash for looking up api method and event namesbfredl2022-05-30
| | | | | This avoids generating khash tables at runtime, and is consistent with how evalfuncs lookup work.
* refactor(uncrustify): format all c code under /src/nvim/Dundar Goc2022-04-29
|
* fix(clang/'Dead store'): do not assign endcol (#17788)dundargoc2022-03-25
|
* chore: fix typos (#17755)dundargoc2022-03-25
| | | | Co-authored-by: Jordan Haine <jhaine@securitycompass.com>
* chore: add additional compiler flags (#17815)Lewis Russell2022-03-24
| | | | | | | | | Added: - -Wdouble-promotion - -Wmissing-noreturn - -Wmissing-format-attribute - -Wsuggest-attribute={pure,const,malloc,cold} Resolves: #343
* feat(ui_client): implement async paste handlingbfredl2022-03-17
|
* feat(ui_client): handle resize eventshlpr982022-03-17
|
* chore: fix typos (#17670)dundargoc2022-03-17
| | | Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* refactor(ui): make auto-generated ui client handlers typesafebfredl2022-03-15
|
* refactor(ui): make ui_client_event_grid_line typesafebfredl2022-03-15
|
* refactor(ui): use "ui_client" instead of "redraw" as general prefixbfredl2022-03-15
|
* feat(ui): invoke ui client handlersbfredl2022-03-15
|
* feat(ui): implement ui_client event handlershlpr982022-03-15
|
* feat(ui): connect to remote ui (only debug messages for now)bfredl2022-03-12
co-authored-by: hlpr98 <hlpr98@gmail.com>