aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ui.h
Commit message (Collapse)AuthorAge
* 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
|
* Notify attached UIs whenever menus changeRobin Allen2015-08-21
| | | | | This adds a redraw notification "update_menu" which is sent whenever Vim's menus are changed by the :menu command and friends.
* api: Simplify UI API on mode changeOmar Sandoval2015-07-26
| | | | | | | Currently, there are two functions in the UI API that are called when the mode changes: insert_mode() and normal_mode(). These can be folded into a single mode_change() entrypoint which can do whatever it wants based on the mode it is passed, limited to INSERT and NORMAL for now.
* tui: make termkey use utf-8 mode when &encoding=utf-8 #2469Björn Linse2015-06-13
|
* ui: Replace cursor_{on,off} by busy_{stop,start}Thiago de Arruda2015-03-15
| | | | | | | | | | | | | | | | | | | | | | | | Switching cursor off is only necessary in two occasions: - When redrawing to avoid terminal flickering - When the editor is busy The first can now be handled by the TUI, so most calls to ui_cursor_off can be removed from the core. So, before this commit it was only necessary to switch the cursor off to notify the user that nvim was running some long operation. Now the cursor_{on,off} functions have been replaced by busy_{stop,start} which can be handled in a UI-specific way(turning the cursor off or showing a busy indicator, for example). To make things even more simpler, nvim is always busy except when waiting for user input or other asynchronous events: It automatically switches to a non-busy state when the event loop is about to be entered for more than 100 milliseconds. `ui_busy_start` can be called when its not desired to change the busy state in the event loop (As its now done by functions that perform blocking shell invocations).
* ui: Rewrite the builtin terminal UIThiago de Arruda2015-02-16
| | | | | Now all terminal-handling code was moved to src/nvim/tui, which implements a new terminal UI based on libtermkey and unibilium
* ui: Implement set_{title,icon}Thiago de Arruda2015-01-14
|
* ui: Add 'rgb' parameter to ui_attachThiago de Arruda2015-01-13
| | | | When set to false, nvim will send cterm color numbers with `highlight_set`.
* ui: Merge standout and reverse into one attributeThiago de Arruda2015-01-13
|
* ui: Add update_fg/update_bg methodsThiago de Arruda2015-01-13
| | | | | It is necessary to notify the UI when the default background/foreground colors change in order to render correctly.
* Revert "[WIP] "abstract_ui" fixes and improvements"Justin M. Keyes2015-01-12
|
* ui: Reimplement `:suspend` command for remote UIs.Thiago de Arruda2015-01-12
| | | | | | - Remove suspend method from the UI protocol - Handle `:suspend` by disconnecting the last channel that sent a request to nvim.
* ui: Add 'rgb' parameter to ui_attachThiago de Arruda2015-01-12
| | | | When set to false, nvim will send cterm color numbers with `highlight_set`.
* ui: Merge standout and reverse into one attributeThiago de Arruda2015-01-12
|