| Commit message (Collapse) | Author | Age |
... | |
| |
|
| |
|
|
|
|
|
|
|
|
| |
- process spawning was decoupled from the rest of the job control logic. The
goal is reusing it for spawning processes connected to pseudo terminal file
descriptors.
- job_start now receives a JobOptions structure containing all the startup
options.
|
|
|
|
|
| |
Job autocommands will no longer buffer data chunks that don't end in newlines
characters.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
| |
Problem: map() leaks memory when there is an error in the expression.
Solution: Call clear_tv(). (Christian Brabandt)
https://code.google.com/p/vim/source/detail?r=v7-4-525
|
|
|
|
|
|
| |
Refactoring summary:
- MB_STRNICMP: Inlined.
- MB_STRNCMP: Inlined.
|
|
|
|
|
| |
Now the attrentry_T structure will store all attributes in separate fields for
cterm and rgb UIs.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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: In some situations, when setting up an environment to trigger an
autocommand, the environment is not properly restored.
Solution: Check the return value of switch_win() and call restore_win()
always. (Daniel Hahler)
https://code.google.com/p/vim/source/detail?r=v7-4-446
|
| |
|
|\
| |
| | |
Macro cleanup
|
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
|
|
|
| |
- Set 't_Co' to 256 at startup. The value can be changed by the user for
compatibility with terminals that are less capable.
- `has('gui_running')` will return 1 if at least one rgb UI is attached.
Even though these changes are hacky, they are necessary to make the transition
to the new UI architecture smoother.
|
| |
|
|\
| |
| | |
[WIP] "abstract_ui" fixes and improvements
|
| |
| |
| |
| |
| | |
t_colors should not be checked when abstract_ui is active, because nvim UI is
not limited to a terminal.
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
Speed up garbage collection (Issue 1687).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For garbage collection all lists are kept in first_list, a list of all
lists.
free_unref_items() searches through first_list and removes unreferenced
lists from it (by calling list_free(..., FALSE)). But after a list was
removed, the search continues from the beginning of first_list (not sure
how many lists were really removed and where to continue in first_list).
This is not necessary anymore since vim-patch 7.0.135, because a call to
list_free(...,FALSE) makes sure, that no other lists (and dictionaries)
are freed. So we always know, that the next list in first_list is
still valid (allocated or NULL) and can be used to continue the search.
Likewise for dictionaries.
Original patch by Ariya Mizutani
https://groups.google.com/forum/#!searchin/vim_dev/GC/vim_dev/DBYOdHQWvqY/1WH04_dwETIJ
|
| | |
|
|/ |
|
|\
| |
| | |
vim-patch:7.4.549
|
| |
| |
| |
| |
| |
| |
| | |
Problem: Function name not recognized correctly when inside a function.
Solution: Don't check for an alpha character.
https://code.google.com/p/vim/source/detail?r=v7-4-549
|
|/
|
|
|
|
|
| |
Problem: Crash when doing a range assign.
Solution: Check for NULL poiter. (Yukihiro Nakadaira)
https://code.google.com/p/vim/source/detail?r=v7-4-541
|
|
|
|
|
|
|
|
| |
Problem: Completing a function name containing a # does not work. Issue
253.
Solution: Recognize the # character. (Christian Brabandt)
https://code.google.com/p/vim/source/detail?r=v7-4-516
|
|
|
|
|
|
|
|
| |
Problem: Crash because reference count is wrong for list returned by
getreg().
Solution: Increment the reference count. (Kimmy Lindvall)
https://code.google.com/p/vim/source/detail?r=v7-4-513
|
|
|
|
|
|
|
|
| |
Problem: When winrestview() has a negative "topline" value there are
display errors.
Solution: Correct a negative value to 1. (Hirohito Higashi)
https://code.google.com/p/vim/source/detail?r=v7-4-491
|
|
|
|
|
|
|
|
| |
Problem: substitute() can be slow with long strings.
Solution: Store a pointer to the end, instead of calling strlen() every
time. (Ozaki Kiichi)
https://code.google.com/p/vim/source/detail?r=v7-4-499
|
|
|
|
|
|
|
| |
Problem: Can't use winrestview to only restore part of the view.
Solution: Handle missing items in the dict. (Christian Brabandt)
https://code.google.com/p/vim/source/detail?r=v7-4-311
|
|\
| |
| | |
Define and use the ARRAY_SIZE macro
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A similar macro is defined in the Linux kernel [1].
To refactor the code I used a slightly modified Coccinelle script I found in
[2].
```diff
// Use the macro ARRAY_SIZE when possible
//
// Confidence: High
// Copyright: (C) Gilles Muller, Julia Lawall, EMN, DIKU. GPLv2.
// URL: http://www.emn.fr/x-info/coccinelle/rules/array.html
// Options: -I ... -all_includes can give more complete results
@@
type T;
T[] E;
@@
- (sizeof(E)/sizeof(*E))
+ ARRAY_SIZE(E)
@@
type T;
T[] E;
@@
- (sizeof(E)/sizeof(E[...]))
+ ARRAY_SIZE(E)
@@
type T;
T[] E;
@@
- (sizeof(E)/sizeof(T))
+ ARRAY_SIZE(E)
@n@
identifier AS,E;
@@
- #define AS(E) ARRAY_SIZE(E)
@@
expression E;
identifier n.AS;
@@
- AS(E)
+ ARRAY_SIZE(E)
```
`spatch --in-place --sp-file array_size.cocci -I src/ -I build/include/ -I build/src/nvim/auto/ src/nvim/*.c`
[1] http://lxr.free-electrons.com/source/include/linux/kernel.h#L54
[2] http://www.emn.fr/z-info/coccinelle/rules/#macros
|
| |
| |
| |
| |
| |
| |
| | |
Problem: Using unitinialized variable.
Solution: Pass the first window of the tabpage.
https://code.google.com/p/vim/source/detail?r=v7-4-442
|
|/
|
|
|
|
|
|
| |
Problem: gettabvar() is not consistent with getwinvar() and getbufvar().
Solution: Return a dict with all variables when the varname is empty.
(Yasuhiro Matsumoto)
https://code.google.com/p/vim/source/detail?r=v7-4-434
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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;
}
...
...
...
}
```
|
|\
| |
| | |
vim-patch:7.4.242 + vim-patch:7.4.243
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Problem: Using setreg() with a list of numbers does not work.
Solution: Use a separate buffer for numbers. (ZyX)
https://code.google.com/p/vim/source/detail?r=v7-4-249
|
| |
| |
| |
| |
| |
| |
| | |
Problem: Cannot use setreg() to add text that includes a NUL.
Solution: Make setreg() accept a list.
https://code.google.com/p/vim/source/detail?r=v7-4-243
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: getreg() does not distinguish between a NL used for a line
break and a NL used for a NUL character.
Solution: Add another argument to return a list. (ZyX)
https://code.google.com/p/vim/source/detail?r=v7-4-242
|
|/ |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
** CID 74786: Resource leak (RESOURCE_LEAK)
/src/nvim/eval.c: 10614 in f_jobsend()
/src/nvim/eval.c: 10616 in f_jobsend()
save_tv_as_string() should return NULL and input_len <= 0 for an empty
string or error. Callers should check that input != NULL instead of
input_len > 0 and assert(input == NULL) when the length must be checked.
|
|
|
|
| |
Also move read_error_exit to os/input.c
|