This requires a couple of extra modules that are not installed by
default, and it requires capturing stdout of the tests--otherwise CMake
output is intermixed with the XML output of busted.
Add check to see if a string contains ], which can result in
cases where wrapping a string in [[...]] breaks. Use [=[...]=] instead
on those strings.
Use [=[...]=] for insert() and expect().
Problem: Cannot append a list of lines to a file.
Solution: Add the append option to writefile(). (Yasuhiro Matsumoto)
https://code.google.com/p/vim/source/detail?r=v7-4-503
-Ported old legacy test over to
test/functional/legacy/writefile_spec.lua
-Tests for mapping and signs from the original patch were removed since
they have nothing to do this with feature
Tested with: make oldtest, make test on OS X.
Signed-off-by: Perry Hung <iperry@gmail.com>
The 'binary' mode flag is ignored on all POSIX conforming systems (man 3
fopen). For all the others, BINARY_FILE_IO needs to be set.
Always set BINARY_FILE_IO.
Signed-off-by: Perry Hung <iperry@gmail.com>
A read stream will be started before the first ex command is processed. This
stream will be used to read early user input before handling control over to the
UI module.
Which stdio stream will be used depends on which types of file descriptors are
connected, and whether the "-" argument was passed.
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.
Since #2158 all connected UIs are informed about the busy state of nvim.
This can be used to decide whether to hide or show the cursor (in one
place).
In the TUI, this is tui_flush(). To prevent cursor flashing, the
terminal is always redrawn with an invisible cursor. After that the
cursor is shown if necessary. In the current implementation
a cursor-hide command will always be the first command in the next
redraw, to prevent flashing. This is not necessary.
Instead we start the TUI with a hidden cursor and only need to hide the
cursor in the next redraw, if the cursor was shown in the last redraw.
Otherwise the cursor is still hidden.
So instead of sending every redraw the cursor-hide command, we only need
to send the command while not busy(a state in nvim with low frequency).
- Check for mercurial before using it
- Make 'Merging patches...' wiki page easier to copy
- Use `basename` instead of assuming the user is running vim-patch.sh
via the repo root
- Appease shellcheck by quoting path variables
- Remove unneeded variable quoting inside [[ ]] blocks
- Don't unconditionally 'exit 1'
'-h' and '--help' are both recognized options, so current behavior is
misleading.
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).
This is a variant of the utfTerminal output handler that will:
- Output the file name before each suite is executed
- Output the test name before each test is executed
This will make it simpler to identify crashing/hanging tests.
ASan spotted a problem when using 'set background={light,dark}' with
color scheme solarized.
While loading the colors for color scheme 'g:colors_name', the pointer
on the value for this variable can become invalid, because of an 'unlet
colors_name' (part of an :highlight clear, syntax.c:6173).
To prevent the use of the freed value, decouple the value from
'g:colors_name' before calling load_colors() with it.