aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ui.h
Commit message (Collapse)AuthorAge
* refactor: fix headers with IWYUdundargoc2023-11-28
|
* refactor: rename types.h to types_defs.hdundargoc2023-11-27
|
* build(IWYU): export generated headersdundargoc2023-11-27
|
* docs: deprecate the "term_background" UI fieldGregory Anders2023-11-13
|
* refactor: replace manual header guards with #pragma oncedundargoc2023-11-12
| | | | | It is less error-prone than manually defining header guards. Pretty much all compilers support it even if it's not part of the C standard.
* build(lint): remove unnecessary clint.py rulesdundargoc2023-10-23
| | | | | Uncrustify is the source of truth where possible. Remove any redundant checks from clint.py.
* feat(ui): restore has('gui_running')Justin M. Keyes2023-02-27
| | | | | | | | | | Problem: has('gui_running') is still common in the wild and our answer has changed over time, causing frustration. https://github.com/vimpostor/vim-tpipeline/commit/95a6ccbe9f33bc42dd4cee45731d8bc3fbcd92d1 Solution: Use stdin_tty/stdout_tty to decide if a UI is (not) a GUI.
* 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.
* perf(ui): mitigate redraw latency regression from TUI refactorbfredl2023-02-08
| | | | | | | | | | | | | | | | | | | | | While the new RPC encoder/decoder implementation in general should have less overhead than the deleted UIBridge serializer previously used for the TUI, it regresses on redraw latency in one important aspect. The old bridge implementation allowed the TUI to process a previous screen line internally in parallel with the main thread rendering the next one in win_line etc. As printing the escape sequences in highlighted cells has a considerable hit in profiles, this has a substantial effect on redraw latency. The RPC implementation, however, waits with sending any data until either a flush, or the buffer is full. This change lowers the granularity of communication again, using an adjustable threshold counted in number of cell events (discounting long repeats and clearing as maximum a single extra event). The current value is guesstimated to something simple on a reasonable scale, which should be bigger than a single line, but multiple events for a big multi-window screen.
* 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)
* 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.
* feat(lua): vim.ui_attach to get ui events from luabfredl2022-08-31
| | | | Co-authored-by: Famiu Haque <famiuhaque@protonmail.com>
* refactor(arena): use a shared block freelistbfredl2022-08-24
| | | | | This is both simpler in client code and more effective (always reuse block hottest in cache)
* perf(ui): reduce allocation overhead when encoding "redraw" eventsbfredl2022-06-20
| | | | | | | | | | | | | | | | | Note for external UIs: Nvim can now emit multiple "redraw" event batches before a final "flush" event is received. To retain existing behavior, clients should make sure to update visible state at an explicit "flush" event, not just the end of a "redraw" batch of event. * Get rid of copy_object() blizzard in the auto-generated ui_event layer * Special case "grid_line" by encoding screen state directly to msgpack events with no intermediate API events. * Get rid of the arcane notion of referring to the screen as the "shell" * Array and Dictionary are kvec_t:s, so define them as such. * Allow kvec_t:s, such as Arrays and Dictionaries, to be allocated with a predetermined size within an arena. * Eliminate redundant capacity checking when filling such kvec_t:s with values.
* refactor(uncrustify): set maximum number of consecutive newlines to 2 (#18695)dundargoc2022-05-25
|
* refactor: format all C files under nvim/ #15977dundargoc2021-10-12
| | | | | | | | * refactor: format all C files under nvim * refactor: disable formatting for Vim-owned files: * src/nvim/indent_c.c * src/nvim/regexp.c * src/nvim/regexp_nfa.c * src/nvim/testdir/samples/memfile_test.c
* external pum: use floating point geometry; typval: add tv_dict_add_floatYatao Li2020-04-28
|
* API/UI: Allow UI to set PUM position and size, and pass the position to ↵Yatao Li2020-04-28
| | | | CompleteChanged
* Merge pull request #10475 from erw7/fix-ext-popupmenuBjörn Linse2019-09-08
|\ | | | | Fix some keys not working in ext_popupmenu
| * Add nvim_ui_pum_set_height to apierw72019-09-08
| |
* | refactor: allow us to process a child queue only while waiting on inputBjörn Linse2019-09-08
|/
* UI/nvim_ui_attach(): add `override` optionJustin M. Keyes2019-05-09
| | | | | | | | | | | | | | | | | | | | Before now, Nvim always degrades UI capabilities to the lowest-common denominator. For example, if any connected UI has `ext_messages=false` then `ext_messages=true` requested by any other connected UI is ignored. Now `nvim_ui_attach()` supports `override=true`, which flips the behavior: if any UI requests an `ext_*` UI capability then the capability is enabled (and the legacy behavior is disabled). Legacy UIs will be broken while a `override=true` UI is connected, but it's useful for debugging: you can type into the TUI and observe the UI events from another connected (UI) client. And the legacy UI will "recover" after the `override=true` UI disconnects. Example using pynvim: >>> n.ui_attach(2048, 2048, rgb=True, override=True, ext_multigrid=True, ext_messages=True, ext_popupmenu=True) >>> while True: n.next_message();
* floats: implement floating windowsBjörn Linse2019-03-02
| | | | Co-Author: Dongdong Zhou <dzhou121@gmail.com>
* ui: implement ext_messagesBjörn Linse2019-02-10
| | | | Co-Author: Dongdong Zhou <dzhou121@gmail.com>
* UI: always use contrete colors for default_colors_setBjörn Linse2019-02-05
| | | | | But add an escape hatch needed for external TUI, so it still can use terminal emulator defaults.
* ui/compositor: add redraws needed due to intersected doublewidth chars.Björn Linse2019-02-02
|
* UI: add "compositor" layer to merge grids for TUI use in a correct wayBjörn Linse2019-02-02
| | | | | | | | Initially we will use this for the popupmenu, floating windows will follow soon NB: writedelay + compositor is weird, we need more flexible redraw introspection.
* multigrid: Change screen_* functions to grid_* functionsUtkarsh Maheshwari2018-12-31
|
* ui: rename ext_newgrid to ext_linegridBjörn Linse2018-10-01
|
* tui: Hint wrapped lines to terminals.Ricky Zhou2018-09-03
| | | | | | | | | | | | | | | | Previously, when neovim would wrap a line across multiple lines, terminal emulators could not detect that the lines represent a single wrapped line as opposed to several separate lines. As a result, many terminals' selection/copying functionality would treat a wrapped line as several newline-delimited lines. Fix this by reenabling a "special trick" from Vim. When a line is wrapped, write the last character of that line followed by the first character of the next line to the terminal. This hints to the terminal that the next line is a continuation of the current line. Extends the raw_line event with a "wrap" parameter which controls when to do wrap hinting.
* ui: use line-based rather than char-based updates in screen.cBjörn Linse2018-07-21
| | | | | | | | | | | | | Add ext_newgrid and ext_hlstate extensions. These use predefined highlights and line-segment based updates, for efficiency and simplicity.. The ext_hlstate extension in addition allows semantic identification of builtin and syntax highlights. Reimplement the old char-based updates in the remote UI layer, for compatibility. For the moment, this is still the default. The bulitin TUI uses the new line-based protocol. cmdline uses curwin cursor position when ext_cmdline is active.
* highlight: refactor to use stateful representationBjörn Linse2018-07-21
| | | | | This allows us to keep track of the source higlight groups, and not only the final combined highlights.
* nvim_list_uis: include channel idBjörn Linse2018-06-01
|
* ui: refactor ui optionsBjörn Linse2018-02-13
|
* ui/tui: highlighting refactorBjörn Linse2018-02-11
| | | | | | | | Make HlAttr contain highlighting state for both color modes (cterm and rgb). This allows us to implement termguicolors completely in the TUI. Simplify some logic duplicated between ui.c and screen.c. Also avoid some superfluous highlighting reset events.
* tui: defer termcodes using a timerJustin M. Keyes2017-12-13
| | | | | | | | | | | | | With this implementation there is no "jank" during startup. Using the main_loop in any fashion is janky. Using only the TUI loop emits the termcodes too soon, or requires bad hacks like counting tui_flush invocations (9 seems to work). ref #7664 ref #7649 ref #7664 ref 27f9b1c7b029d8
* tui: rework deferred-termcodes implementationJustin M. Keyes2017-12-13
| | | | | | | | | | Try another approach to defer the termcodes. Seems less janky, but still not perfect. ref #7664 ref #7649 ref #7664 ref 27f9b1c7b029d8
* Adds nvim_get_hl_by_name/by_idMatthieu Coudron2017-09-30
| | | | | | | | | ...in order to retrieve highlights. Added test/functional/api/highlight_spec.lua HL_NORMAL is not really a good name, since it's more like an empty attribute than the normal's one. If one pays attention, syn_cterm_attr2entry is never called with attr=0 because it's always special cased before. I suggest in subsequent PRs we remove the ATTR_OFF and just insert an EMPTY ATTR/RESET_ATTR/UNINITIALIZED for id 0.
* api: generate ui eventsBjörn Linse2017-05-10
|
* api/ui: externalize tablineJustin M. Keyes2017-04-26
| | | | | | - Work with a bool[] array parallel to the UIWidget enum. - Rename some functions. - Documentation.
* api/ui: externalize tablineDongdong Zhou2017-04-26
|
* refactor/single-include: ui.h, ui_bridge.h, ugrid.h (#6571)relnod2017-04-22
|
* ui: use an array for mode stylesBjörn Linse2017-04-21
|
* ui: support more cursor shape modesBjörn Linse2017-04-21
| | | | throttle unneccessary cursor shape events
* 'guicursor': enabled=false if 'guicursor' is emptyJustin M. Keyes2017-04-04
| | | | | Closes #6429 Closes #6430
* tui: 'guicursor' shape #6044Matthieu Coudron2017-04-01
| | | | Closes #2583
* api/ui: use ui options instead of one method per featureBjörn Linse2016-08-29
| | | | Use new nvim_ui_ prefix to avoid breaking change.
* api/ui: allow popupmenu to be drawn by external uiBjörn Linse2016-08-29
|
* syntax: Add support for the "special" color used for undercurlsAdnoC2016-05-17
|
* encoding: simplify handling of encoding in TUIBjörn Linse2015-09-08
|