| Commit message (Collapse) | Author | Age |
... | |
| |
|
|
|
|
|
|
|
|
| |
Travis defines[1] $CI for its builds, whereas $CI_TARGET is
a Neovim-specific env var from 6483a198e4bee1e80683ba12e061616c3e6c4090
that lost prominence in d2eb4a934683b5da63000d8b79a0d4c9a314d1c0.
[1] https://docs.travis-ci.com/user/environment-variables/
|
| |
|
| |
|
|
|
|
| |
Target: make all tests run with chmod -x ~/.config/nvim ~/.local/share/nvim.
|
|
|
|
| |
The tests use `termopen` to spawn nvim and verify the TUI.
|
| |
|
|
|
|
|
| |
This adds a redraw notification "update_menu" which is sent whenever
Vim's menus are changed by the :menu command and friends.
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
Helped-by: Thiago de Arruda <tpadilha84@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Modify tty-test to allow easier control over the terminal
- Add a new directory with various terminal tests/specifications
- Remove a pending job/pty test.
- Flush stdout in Screen:snapshot_util() (avoid waiting for the test to finish)
- Replace libuv sigwinch watcher by a sigaction handler. libuv randomly fails to
deliver signals on OSX. Might be related to the problem fixed by
@bbcddc55ee1e5605657592644be0102ed3a5f104 (under the hoods, libuv uses a pipe
to deliver signals to the main thread, which might be blocking in some
situations)
|
|
|
|
|
|
| |
This is can be used for spawning nvim outside a test context. Also refactor
screen.lua to use this function when loading the color map(It is better because
the GDB/VALGRIND environment variables are ignored)
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
The flag is no longer valid(pynvim always starts a GUI)
|
|
|
|
|
|
| |
Some screen tests such as system/ctrl+c(viml_system_spec.lua) can take some time
to respond(default kill timeout is 2 seconds for an interrupted job) and fail
when running under a slow environment such as travis.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
While running under valgrind, the screen can take significantly longer to
update(especially on travis) so a higher timeout can be required. Also reduce
the timeout when not running on valgrind.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a test that fails leaves nvim in a 'Press Enter...' state, the whole suite
will hang because the `qa!` command executed before the next test won't be
processed until '<enter>' is sent.
Now the lua client can send a signal with when `Session:exit()` is called, so
the `qa!` request is no longer necessary.
Also:
- Set noswapfile at startup to prevent tests from leaving .s* swap files(should
also improve test environment determinism)
- Use `assert(false, msg) instead of `error(msg)` to report screen assertion
failures.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
- emulate gui_running and terminal colors
- scrolling/clearing regions
- mouse wheel scrolling
- setting icon/title
- :stop/:suspend
- screen resize
|
| |
|
| |
|
|
|
|
| |
When set to false, nvim will send cterm color numbers with `highlight_set`.
|
| |
|
|
|
|
|
| |
It is necessary to notify the UI when the default background/foreground colors
change in order to render correctly.
|
|
|
|
| |
These functions need to operate on the current the scroll region.
|
| |
|
|
|
|
|
|
| |
- Remove suspend method from the UI protocol
- Handle `:suspend` by disconnecting the last channel that sent a request to
nvim.
|
|
|
|
| |
When set to false, nvim will send cterm color numbers with `highlight_set`.
|
| |
|
|
|
|
|
| |
It is necessary to notify the UI when the default background/foreground colors
change in order to render correctly.
|
|
|
|
|
| |
It should only clear to the end of the current scroll region(this is the
behavior expected by nvim)
|
| |
|
|
- Add screen.lua which implements a remote screen to verify screen state by
tests under functional/ui
- Add some basic screen/highlight tests
|