| Commit message (Collapse) | Author | Age |
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Uncrustify is the source of truth where possible.
Remove any redundant checks from clint.py.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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)
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Co-authored-by: Famiu Haque <famiuhaque@protonmail.com>
|
|
|
|
|
| |
This is both simpler in client code and more effective (always reuse
block hottest in cache)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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: 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
|
| |
|
|
|
|
| |
CompleteChanged
|
|\
| |
| | |
Fix some keys not working in ext_popupmenu
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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();
|
|
|
|
| |
Co-Author: Dongdong Zhou <dzhou121@gmail.com>
|
|
|
|
| |
Co-Author: Dongdong Zhou <dzhou121@gmail.com>
|
|
|
|
|
| |
But add an escape hatch needed for external TUI, so it still can use
terminal emulator defaults.
|
| |
|
|
|
|
|
|
|
|
| |
Initially we will use this for the popupmenu, floating windows will
follow soon
NB: writedelay + compositor is weird, we need more flexible
redraw introspection.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This allows us to keep track of the source higlight groups,
and not only the final combined highlights.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
Try another approach to defer the termcodes. Seems less janky, but still
not perfect.
ref #7664
ref #7649
ref #7664
ref 27f9b1c7b029d8
|
|
|
|
|
|
|
|
|
| |
...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.
|
| |
|
|
|
|
|
|
| |
- Work with a bool[] array parallel to the UIWidget enum.
- Rename some functions.
- Documentation.
|
| |
|
| |
|
| |
|
|
|
|
| |
throttle unneccessary cursor shape events
|
|
|
|
|
| |
Closes #6429
Closes #6430
|
|
|
|
| |
Closes #2583
|
|
|
|
| |
Use new nvim_ui_ prefix to avoid breaking change.
|
| |
|
| |
|
| |
|