| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
Use os_scandir().
fname_case() only gets used when `defined(USE_FNAME_CASE)` (on operating
systems with case-insensitive file systems), but may be useful in other
contexts, so move it to path.c. (See the TODO.)
Remove the unused parameter, len.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|\
| |
| | |
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.
|
| |
| |
| |
| | |
This avoids recompiles after commiting.
|
|/
|
|
| |
This avoids recompiling every c file after comitting.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
| |
|
|
|
|
|
|
|
| |
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 : getdigits() currently returns a long, but at most places,
return value is casted (unsafely) into an int. Making casts
safe would introduce a lot of fuss in the form of assertions
checking for limits.
Note : We cannot just change return type to int, because, at some
places, legitimate long values are used. For example, in
diff.c, for line numbers.
Solution : Introduce new functions:
- get_digits() : Gets an intmax_t from a string.
- get_int_digits() : Wrapper for ints.
- get_long_digits() : Wrapper for longs.
And replace getdigits() invocations by the appropiate
wrapper invocations.
|
|
|
|
|
|
|
|
| |
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: Completion for :buf does not use 'wildignorecase'. (Akshay H)
Solution: Pass the 'wildignorecase' flag around.
https://code.google.com/p/vim/source/detail?r=v7-4-455
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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;
}
...
...
...
}
```
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
Fixed a bug introduced in SHA:aa66f2487edde49b9a5ba10cd70d706d06a94e25,
due to a misapplied patch. buf_del_sign should redraw the window if the
sign deleted was the last one in the buffer.
Also moved the curwin verification to the correct function.
|
|\
| |
| | |
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
|
|/ |
|
|
|
|
|
|
|
| |
Problem: Using freed memory when exiting while compiled with EXITFREE.
Solution: Set curwin to NULL and check for that. (Dominique Pelle)
https://code.google.com/p/vim/source/detail?r=v7-4-369
|
| |
|
| |
|
| |
|
|\
| |
| | |
Add FOR_ALL_BUFFERS helper
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Problem: 'lispwords' is a global option.
Solution: Make 'lispwords' global-local. (Sung Pae)
https://code.google.com/p/vim/source/detail?r=06e5f65c34d8136c3a9d2219429b7eca35cb3a21
|
|/ |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`-Wstrict-prototypes` warn if a function is declared or defined without
specifying the argument types.
This warning disallow function prototypes with empty parameter list.
In C, a function declared with an empty parameter list accepts an
arbitrary number of arguments when being called. This is for historic
reasons; originally, C functions didn't have prototypes, as C evolved
from B, a typeless language. When prototypes were added, the original
typeless declarations were left in the language for backwards
compatibility.
Instead we should provide `void` in argument list to state
that function doesn't have arguments.
Also this warning disallow declaring type of the parameters after the
parentheses because Neovim header generator produce no declarations for
old-stlyle prototypes: it expects to find `{` after prototype.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|