| Commit message (Collapse) | Author | Age |
... | |
| |
| |
| |
| |
| | |
'ttybuiltin' was removed and *_BUILTIN_TCAPS was made into dead code in
PR #1820.
|
|\ \
| |/
|/| |
fix missing conceal cchar when it is the first syntax group shown
|
| | |
|
| |
| |
| |
| |
| | |
in screen.c:win_line seqnr 0 represents the state: no current syntax
item
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem : Resource leak @ 94, 98, 102.
Diagnostic : Real issue.
Rationale : Coverity doesn't know that uv_pipe_open will save file
descriptor to close them later. So, it signals file
descriptors being leaked. This would then seem like a false
positive we can fix by teaching coverity about uv_pipe_open
through model file.
But then we realize that the above is only true if
uv_pipe_open succeeds. It it fails, then descriptors are
really being leaked, which is why this is considered a real
issue and not a false positive after all.
Resolution : Add error handling to correctly close descriptors if
uv_pipe_open fails at any point.
Add model for uv_pipe_open so that Coverity knows it will
save descriptors when no error.
Helped-by: oni-link <knil.ino@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem : Unchecked return value from library @ 91.
Diagnostic : Real issue.
Rationale : fcntl can fail, which is not being checked.
Resolution : Add corresponding error handling.
Helped-by: oni-link <knil.ino@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem : Free of array-typed value @ 3628.
Diagnostic : False positive.
Rationale : expand_shell_cmd() is called with a mock value for file
(*file = (char_u **)""). That means we want file to be
filled with a new value. We can't use *file = NULL because
that means we don't want file to be filled.
Now, coverity incorrectly thinks that sentinel value is the
one we are freeing up at some other later point, which is
not the case.
Resolution : Assert that, when we are freeing *file, its value is
different than the sentinel one.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem : String not null terminated @ 1543.
Diagnostic : Real issue.
Rationale : We are reading a struct block0, which contains some string
fields, from a file, without checking for string fields to
be correctly terminated. That could cause a buffer overrun
if file has somehow been garbled.
Resolution : Add string fields check for nul termination.
Mark issue as intentional (there seems to be no way of
teaching coverity about read_eintr being ok that way).
Helped-by: oni-link <knil.ino@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
This is enabled by setting the `$NVIM_TUI_ENABLE_TRUE_COLOR` environment
variable, eg:
```
$ NVIM_TUI_ENABLE_TRUE_COLOR=1 nvim
```
|
|\
| |
| | |
Fix a couple warnings in the release build.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| | |
Clean up said functions and some outdated comments while we're at it.
|
| | |
|
| |
| |
| |
| | |
Many tests were migrated, but entries were left in the old Makefile.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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).
|
| | |
|
| |
| |
| |
| |
| | |
This is required to be compatible with plugins that ask user questions at
startup(eg: vim-addon-local-vimrc)
|
| |
| |
| |
| | |
The bodies of f_browse() and f_browsedir() were identical.
|
| |
| |
| |
| | |
from_noamp is always NULL in this branch
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
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).
|
| |
| |
| |
| |
| |
| | |
refs #2138
vim-patch: https://code.google.com/p/vim/source/detail?r=476a12a96bb1e5ccc71b1c1010d529deca271617
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
|
|
| |
Problem: Incorrectly read the number of buffer for which an autocommand
should be registered.
Solution: Reverse check for "<buffer=abuf>". (Lech Lorens)
https://code.google.com/p/vim/source/detail?r=v7-4-637
|
|\
| |
| | |
Remove redundant casts
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This removes the ability to start nvim via the following aliases in
favor of just using their command line arguments:
ex vim -e
exim vim -E
view vim -R
gvim vim -g
gex vim -eg
gview vim -Rg
rvim vim -Z
rview vim -RZ
rgvim vim -gZ
rgview vim -RgZ
This also removes Vi mode (-v) for consistency. From ':help -v':
-v Start Ex in Vi mode. Only makes a difference when the
executable is called "ex" or "gvim". For gvim the GUI is not
started if possible.
|
| |
| |
| |
| |
| |
| | |
refs #1761
Original vim patch: http://ftp.vim.org/vim/patches/7.4/7.4.615
|
|\ \
| | |
| | | |
Fixes for two compiler warnings
|
| | |
| | |
| | |
| | |
| | | |
In case of an evaluation error the returned Object is not initialized,
so initialize it with OBJECT_INIT.
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
Compiler warns about buf always being nonnull.
buf is per function attribute always nonnull, so buf can be removed from
the assert(). But a buffer length of zero is also no problem, because it
makes uv_cwd() return a failure without writing into buf. So the
remaining length check can also be removed.
|
| |
| |
| |
| |
| |
| | |
these path names are ridiculous...
Based on #889, but also remove some unused #defines
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|