| Commit message (Collapse) | Author | Age |
... | |
|
|
|
| |
Closes #2583
|
|
|
|
|
|
|
| |
statusline still disappears in some cases, but this change is a net
improvement.
References #3929 #5692 #4884 #6157
|
| |
|
|
|
|
|
|
|
|
|
| |
Closes #1234
multiqueue:
- Implement multiqueue_size()
- Rename MultiQueueItem.parent to MultiQueueItem.parent_item, to avoid confusion
with MultiQueue.parent.
|
|\
| |
| | |
Add cmdline mode to ui_mode_change
|
| |
| |
| |
| |
| |
| |
| |
| | |
use set_cursor_shape_bar for cmdline mode
fix test of screen_basic_spec.lua & screen.lua
comment fix
|
|/
|
| |
Closes #5558
|
|
|
|
| |
Followup for #5461
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`utf_ambiguous_width` expects the Unicode character, but in 9e1c6596 I
just passed the first UTF-8 byte to the function. This led to various
display problems because now many multi-cell characters weren't falling
into that part of the branch.
Also, to better align with the existing Vim code, remove the forced
cursor update. Setting the flag will cause it to happen in the next
UI_CALL.
Thanks to qvacua for all the help investigating the issue!
Closes #5448
|
|
|
|
|
|
|
|
|
| |
Problem: Display problems when the 'ambiwidth' and 'emoji' options are not
set properly or the terminal doesn't behave as expected.
Solution: After drawing an ambiguous width character always position the
cursor.
https://github.com/vim/vim/commit/cb0700844c1274fe8bc0ceaffaee0ad21c406f30
|
|
|
|
| |
Closes #4163
|
|
|
|
|
|
|
|
|
|
| |
move `call_shell` to misc1.c
Move some fns to state.c
Move some fns to option.c
Move some fns to memline.c
Move `vim_chdir*` fns to file_search.c
Move some fns to new module, bytes.c
Move some fns to fileio.c
|
|
|
|
| |
Use new nvim_ui_ prefix to avoid breaking change.
|
| |
|
| |
|
| |
|
|\
| |
| | |
api: refactor remote ui to use API dispatch generation
|
| | |
|
|/
|
|
|
|
| |
The TUI can be enabled/disabled at build time with -DFEAT_TUI, default is ON for
UNIX, and OFF for non UNIX. When off, Neovim prints a message to stderr, along
with a list of the server endpoints.
|
| |
|
|
|
|
|
|
|
| |
The UI_CALL macro uses variadic macros and relies on the non standard
GCC extension. MSVC already applies similar behavior for the regular
__VA_ARGS__ removing the comma.
In MSVC UI_CALL can be implemented by calling UI_CALL_MORE directly.
|
| |
|
|
|
|
|
| |
This adds a redraw notification "update_menu" which is sent whenever
Vim's menus are changed by the :menu command and friends.
|
|
|
|
|
|
|
|
|
|
| |
- Improve the implementation of deferred/immediate events.
- Use the new queue module to change how/when events are queued/processed by
giving a private queue to each emitter.
- Immediate events(which only exist to break uv_run recursion) are now
represented in the `loop->fast_events` queue.
- Events pushed to child queues are propagated to the event loop main queue and
processed as K_EVENT keys.
|
|
|
|
|
|
|
| |
This is a port of my original contribution to Vim, added in 7.4.687
(https://github.com/vim/vim/commit/v7-4-687). The TUI code has been
heavily refactored (see esp. 25ceadab37edba13f5afa78d8b4723da03ef35f0),
so this required some translation, but the logic is the same.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
- Add event loop abstraction module under src/nvim/event. The
src/nvim/event/loop module replaces src/nvim/os/event
- Remove direct dependency on libuv signal/timer API and use the new abstraction
instead.
- Replace all references to uv_default_loop() by &loop.uv, a new global variable
that wraps libuv main event loop but allows the event loop functions to be
reused in other contexts.
|
| |
|
|
|
|
|
| |
This is required to avoid event loop recursion due to indirect calls to
os_breakcheck by screenalloc
|
|
|
|
|
|
|
|
|
|
|
| |
Even though assuming nvim is busy most times is simpler, it has a problem: A lot
of unnecessary busy_start/busy_stop notifications are sent to the UI. That's
because in the majority of scenarios almost no time is spent between
`event_poll` calls.
This restores the normal behavior which is to call busy_start only when nvim is
going to perform some task that can take a significant amount of time. Also
improve the usage of buffering in the TUI when changing the cursor state.
|
|
|
|
|
| |
Also add back the `ui_flush` call to `get_keystroke`. Its necessary to display
prompt messages correctly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Removed term.c, term.h and term_defs.h
- Tests for T_* values were removed. screen.c was simplified as a
consequence(the best strategy for drawing is implemented in the UI layer)
- Redraw functions now call ui.c functions directly. Updates are flushed with
`ui_flush()`
- Removed all termcap options(they now return empty strings for compatibility)
- &term/&ttybuiltin options return a constant value(nvim)
- &t_Co is still available, but it mirrors t_colors directly
- Remove cursor tracking from screen.c and the `screen_start` function. Now the
UI is expected to maintain cursor state across any call, and reset it when
resized.
- Remove unused code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Refactoring summary:
- ui_write(): len: int --> size_t
* parse_abstract_ui_codes(): len: int --> size_t
* string_convert(): lenp: int * --> size_t *
- string_convert_ext(): lenp : int * --> size_t *
unconvlenp: int * --> size_t *
* utf8len_tab_zero: char[] --> uint8_t[]
* iconv_string(): slen : int --> size_t
unconvlenp: int * --> size_t *
resultlenp: int * --> size_t *
- mch_print_text_out(): len: int --> size_t
* out_pos: int --> size_t
|
|
|
|
|
| |
Now the attrentry_T structure will store all attributes in separate fields for
cterm and rgb UIs.
|
|
|
|
|
| |
Now all terminal-handling code was moved to src/nvim/tui, which implements a
new terminal UI based on libtermkey and unibilium
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Remove abstract_ui global, now it is always active
- Remove some terminal handling code
- Remove unused functions
- Remove HAVE_TGETENT/TERMINFO/TERMIOS/IOCTL #ifdefs
- Remove tgetent/terminfo from version.c
- Remove curses/terminfo dependencies
- Only start/stop termcap when starting/exiting the program
- msg_use_printf will return true if there are no attached UIs(
messages will be written to stdout)
- Remove `ex_winpos`(implement `:winpos` with `ex_ni`)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
- Set 't_Co' to 256 at startup. The value can be changed by the user for
compatibility with terminals that are less capable.
- `has('gui_running')` will return 1 if at least one rgb UI is attached.
Even though these changes are hacky, they are necessary to make the transition
to the new UI architecture smoother.
|
|
|
|
|
| |
Before sending a resize command to the UIs, flush the current output buffer to
ensure no redraw commands for a screen with invalid size are processed.
|
|
|
|
|
| |
ui_linefeed will scroll the screen when it becomes full. This can happen when
executing external commands.
|
| |
|
|
|
|
|
| |
Forward the command to the remote UI and flush immediately. The
semantics/handling is UI-specific.
|
| |
|
|
|
|
| |
When set to false, nvim will send cterm color numbers with `highlight_set`.
|
| |
|
| |
|
| |
|