| Commit message (Collapse) | Author | Age |
... | |
|
|
|
| |
See: #459
|
|
|
|
|
|
| |
We already use wrappers for allocation, the new `xfree` function is the
equivalent for deallocation and provides a way to fully replace the malloc
implementation used by Neovim.
|
|
|
|
|
|
|
|
|
| |
The JobActivity event got replaced by callback functions provided to
jobstart() or termopen().
It got removed here:
https://github.com/neovim/neovim/commit/6e7757ad51dfe3b2de857ff8a8688718ff6115ac
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- Remove JobActivity autocmd and v:job_data variable
- Simplify `jobstart` to receive:
- An argument vector
- An optional dictionary which may contain any of the current `jobstart`
options plus `on_stdout`, `on_stderr` and `on_exit` callbacks.
- Refactor and add more job tests
- Update documentation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit integrates libvterm with Neovim and implements a terminal emulator
with nvim buffers as the display mechanism. Terminal buffers can be created
using any of the following methods:
- Opening a file with name following the "term://[${cwd}//[${pid}:]]${cmd}"
URI pattern where:
- cwd is the working directory of the process
- pid is the process id. This is just for use in session files where a pid
would have been assigned to the saved buffer title.
- cmd is the command to run
- Invoking the `:terminal` ex command
- Invoking the `termopen` function which returns a job id for automating the
terminal window.
Some extra changes were also implemented to adapt with terminal buffers. Here's
an overview:
- The `main` function now sets a BufReadCmd autocmd to intercept the term:// URI
and spawn the terminal buffer instead of reading the file.
- terminal buffers behave as if the following local buffer options were set:
- `nomodifiable`
- `swapfile`
- `undolevels=-1`
- `bufhidden=hide`
- All commands that delete buffers(`:bun`, `:bd` and `:bw`) behave the same for
terminal buffers, but only work when bang is passed(eg: `:bwipeout!`)
- A new "terminal" mode was added. A consequence is that a new set of mapping
commands were implemented with the "t" prefix(tmap, tunmap, tnoremap...)
- The `edit` function(which enters insert mode) will actually enter terminal
mode if the current buffer is a terminal
- The `put` operator was adapted to send data to the terminal instead of
modifying the buffer directly.
- A window being resized will also trigger a terminal resize if the window
displays the terminal.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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: 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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
| |
MacOS (pre Mac OS X) is not supported anymore.
|
|
|
|
| |
TabClosed is triggered when a tab page closes.
|
|
|
|
| |
TabNewEntered is triggered after vim has entered a buffer in new tab.
|
|
|
|
|
| |
TabNew triggers when entering a new tab page, but not when entering an
already created one.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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`)
|
|
|
|
|
|
|
|
|
|
| |
Problem : Out-of-bounds access @ 5815.
Diagnostic : False positive.
Rationale : Error occurs when event_name2nr() returns NUM_EVENTS, which
means an event with that name was not found. That cannot
happen, as previous check using find_end_event() @ 5744
ensures event name exists.
Resolution : Assert event_name2nr() result is less thatn NUM_EVENTS.
|
|
|
|
|
|
|
| |
While we're here:
- Remove references to the '+diff' feature, which has since been made
non-optional.
- Update a few Vim instances with Nvim.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Neovim always ships with all features[0], so this serves no purpose.
Besides, this always evaluated to true.
[0]: https://github.com/neovim/neovim/wiki/Differences-from-vim
|
|
|
|
|
|
| |
Regarding dict_lookup() in eval.c: both definitions are the same, the
only difference being the spacing between the indirection operator and
the indentation level.
|
|
|
|
|
|
|
|
|
| |
Problem: A TextChanged autocommand is triggered when saving a file.
(William Gardner)
Solution: Update last_changedtick after calling unchanged(). (Christian
Brabandt)
https://code.google.com/p/vim/source/detail?r=v7-4-493
|
|
|
|
|
|
|
|
| |
Problem: 'backupcopy' is global, cannot write only some
files in a different way.
Solution: Make 'backupcopy' global-local. (Christian Brabandt)
https://code.google.com/p/vim/source/detail?r=v7-4-456
|
|
|
|
|
|
|
|
| |
Problem : Exlicit null dereferenced (FORWARD NULL) @ 2859.
Diagnostic : Real issue.
Rationale : Code within `if (!p_bk)` seems to assume `backup` not null
at that point, which may not be true.
Resolution : Don't enter conditional on null `backup`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace code like this
```c
func() {
if (cond) {
...
...
...
}
return ret;
}
```
```c
for (...) {
if (cond) {
...
...
...
}
}
```
with
```c
func() {
if (!cond) {
return ret;
}
...
...
...
}
```
```c
for (...) {
if (!cond) {
continue;
}
...
...
...
}
```
|
|
|
|
|
|
| |
Nvim now relies much less on setting terminal mode to cooked mode, remove most
calls to settmode, except for those that happen on startup or when suspending.
Eventually even those will be handled by the UI layer.
|
|
|
|
| |
Also move read_error_exit to os/input.c
|
|
|
|
|
| |
These functions only used to call another os_* function, so remove them and
replace all occurences in the project.
|
| |
|
|
|
|
|
|
|
|
| |
Problem: Cannot define a command only when it's used.
Solution: Add the CmdUndefined autocommand event. (partly by Yasuhiro
Matsumoto)
https://code.google.com/p/vim/source/detail?r=v7-4-414
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Problem : Dereference of null pointer @ 6219.
Diagnostic : False positive.
Rationale : Problem occurs if `aucmd_win` is NULL after
`win_alloc_aucmd_win()`, which cannot happen since it uses
new memory functions. So, this is a leftover since OOM
refactorization.
Resolution : Remove dead code.
|
|
|
|
|
|
|
|
|
|
|
| |
Problem : Dead assignment @ 1754.
Diagnostic : Harmless issue.
Rationale : It's true `iconv_fd` is not going to be used again (we are
in the failure handler). But what is being done (assigning
sentinel value to mark as "empty" after destroying) is in
fact good practice, which could turn significant if more
code is added later on. So, we don't want to remove this.
Resolution : Leave it there, but exclude from analysis.
|
|
|
|
|
| |
This seems to have been disabled in the transition from vim to neovim,
re-enable it.
|
|
|
|
|
|
|
|
|
| |
Problem: ml_get error for autocommand that moves the cursor of the
current window.
Solution: Check the cursor position after switching back to the current
buffer. (Christian Brabandt)
https://code.google.com/p/vim/source/detail?r=v7-4-436
|
|\
| |
| | |
Remove FOR_ALL_WINDOWS and replace with FOR_ALL_WINDOWS_IN_TAB(curtab)
|
| | |
|
|\ \
| |/
|/| |
vim-patch:7.4.320
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Possible crash when an BufLeave autocommand deletes the buffer.
Solution: Check for the window pointer being valid. Postpone freeing the
window until autocommands are done. (Yasuhiro Matsumoto)
https://code.google.com/p/vim/source/detail?r=v7-4-320
|
|/ |
|
| |
|
|
|
|
| |
off_t -> uint64_t
|
| |
|
| |
|
| |
|
|
|
|
| |
this replaces os_get_file_size and file_info.stat.st_size
|
|\
| |
| | |
Add FOR_ALL_BUFFERS helper
|
| | |
|