| Commit message (Collapse) | Author | Age |
... | |
| | |
| | |
| | |
| | |
| | |
| | | |
Implement functions for spawning, destroying, and listing active
servers, and add server_address_list() to msgpack_rpc/server.c for the
serverlist() vimL function.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Testing of server_start() and server_stop() found that after adding a
server at address addr, pmap_has(addr) would always return true, but
pmap_get(addr) would always return NULL.
Since a client is only expected to have a small number of servers, an
array may be more efficient than a hash map, anyway.
Discussion:
https://github.com/neovim/neovim/pull/1302#issuecomment-88487148
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- In UNIX systems where unsetenv() is available, it is used. Otherwise
the variables are set with the empty string.
- New check HAVE_UNSETENV for unsetenv()
- Added unit test to env_spec.lua
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Consider: `let vim = rpcstart('nvim', ['--embed'])`
Allows `rpcnotify(vim, ...)` to work like an asynchronous
`rpcrequest(nvim, ...)`.
Helped-by: Michael Reed <m.reed@mykolab.com>
Helped-by: Justin M. Keyes <>
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Jemalloc will be used if the cmake option `USE_JEMALLOC` is enabled(which is the
default). To avoid trouble with clang's ASAN, it is disabled by default if the
`SANITIZE` option is enabled.
Since jemalloc has thread cache for small objects, it fills the gap created by
removing klib memory pools.
The `xstrdup` funciton(memory.c) had to be reimplemented on top of `xmalloc` to
make it work with a custom allocator.
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
Klib pools were used to improve allocation efficiency for some small objects,
but it is not a thread-safe approach. Thread safety in allocations will be
required for implementing #2371).
|
| |
| |
| |
| | |
This causes a "read after free" error when kmp_free is replaced by `free`.
|
| |
| |
| |
| | |
See: #459
|
| |
| |
| |
| | |
See #459
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The CENT macro was set condionally depending on the FEAT_GUI constant that was
removed a long time ago.
Other small refactorings:
- remove obsolete TERM= flags
- sort and indent lines in array for readability
- 'Conceal' and 'WildMenu' were moved from highlight_init_{dark,light}[]
to highlight_init_both[] since the same values were used anyway
|
| |
| |
| |
| |
| |
| | |
See: #459
Reviewed-by: Justin M. Keyes <justinkz@gmail.com>
Reviewed-by: Eliseo Martínez <eliseomarmol@gmail.com>
|
| |
| |
| |
| |
| | |
- To reproduce: ":recover non_existent_swapfile"
- Regression: 00f18e2e09af35494d0b94ae76a9dbc3e0319d89
|
| |
| |
| |
| |
| | |
- regression by 42f1bd9b2228aaca4fb8a5597a3b5774f7ef6876
- closes #1836
|
| | |
|
| |
| |
| |
| | |
remove some #ifdef noise
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
vim_strsave() is replaced by expand_env_save_opt(), which expands ~ for
convenience:
:profile start ~/.nvim/prof.log
Prior to this change you had to specify an absolute path.
|
|\ \
| | |
| | | |
[RFC] coverity/108870: Missing break in switch
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
All these issues are false positives that result from coverity's
inability to properly follow arithmetic implications in expressions
using some macros. Redefining macros another way to make arithmetic
implications clearer fixes the issues.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The JobActivity event got replaced by callback functions provided to
jobstart() or termopen().
It got removed here:
https://github.com/neovim/neovim/commit/6e7757ad51dfe3b2de857ff8a8688718ff6115ac
|
| | |
| | |
| | |
| | |
| | |
| | | |
- Properly save job event deferring state for recursive calls
- Disable breakcheck while running. Breakcheck can invoke job callbacks
in unexpected places.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Helped-By: Scott Prager <splinterofchaos@gmail.com>
|
|/ /
| |
| |
| |
| | |
Helped-By: Nicolas Hillegeer <nicolas@hillegeer.com>
Helped-By: Michael Reed <m.reed@mykolab.com>
|
| | |
|
| |
| |
| |
| |
| |
| | |
Regarding |script-here|: despite being a language agnostic piece of
advice, it was in `if_perl.txt`. Regardless, we now only have one
support for one legacy plugin interface, so put it in `if_pyth.txt`
|
| | |
|
| | |
|
| |
| |
| |
| | |
Signed-off-by: Michael Reed <m.reed@mykolab.com>
|
| |
| |
| |
| | |
JUMPLIST_ROTATE is never defined, and the feature is not popular.
|
| |
| |
| |
| |
| |
| |
| | |
These highlight groups replace the old mechanism of setting:
- {g,b}:terminal_focused_cursor_highlight
- {g,b}:terminal_unfocused_cursor_highlight
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Reported by @fourjay, a codepath that causes event_poll() to run before
event_init() will trigger a segfault as the events list will not have
been initialized. Exiting immediately from event_init() causes nvim to
hang, so just exit before running the events.
fixes #2339
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In the fallowing functions, use get_tv_string() to safely avoid a NULL
pointer dereference.
* rpcstart
* rpcrequest
* rpcnotify
* jobstart
fixes #2321
|
| |
| |
| |
| | |
fixes #2286
|
| | |
|
|\ \
| | |
| | | |
vim-patch: Port parts of Vim 7.4.399.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Resolves #1753.
https://code.google.com/p/vim/source/detail?r=v7-4-399
Reviewed-by: Felipe Oliveira Carvalho <felipekde@gmail.com>
Helped-by: David Bürgin <676c7473@gmail.com>
Helped-by: Scott Prager <splinterofchaos@gmail.com>
Helped-by: Michael Reed <m.reed@mykolab.com>
Helped-by: Felipe Oliveira Carvalho <felipekde@gmail.com>
|
|\ \ \
| | | |
| | | | |
[RFC] terminal: Handle loss of focus in event loop.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The fallowing test (reduced), submitted by @mhinz may free term->buf,
leaving the pointer dangling.
```vim
let s:buf = -1
function! s:exit_handler()
execute 'bdelete!' s:buf
endfunction
vnew
let s:buf = bufnr('%')
let id = termopen('sleep 1', { 'on_exit': function('s:exit_handler') })
call s:test()
```
When the buffer is known to be closing, set term->buf to NULL, and check
buf_valid() in on_refresh().
Helped-by: Marco Hinz (@mhinz)
|
| | | |
| | | |
| | | |
| | | | |
fixes #2317
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Pressing <C-\> and then a mouse click will insert the click into the
terminal as if a keyboard button had been pressed.
Keep track of whether the last input was <C-\> and only call
terminal_send_key() if the next input is a key press.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
While in a terminal and insert mode, if an event caused loss of focus,
nvim would stay in the terminal event loop causing an inconsistent view
of internal state and/or segfault.
Remove the "term" argument from terminal_enter() as it only makes sense
to call it with curbuf->terminal. Terminate the loop when switched to a
different buffer.
fixes #2301
|
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
event_poll() always leaves the libuv I/O loop after one iteration. The
duration for how long the loop polls for I/O is given by the shortest
timeout of all active timers. Is no timer active, I/O is/could be polled
indefinitely.
To make sure our timer is still active when I/O polling begins,
a prepare handle is used to start the timer right before the polling.
But by only using a timer that restarts after its timeout was reached,
we also can assure that polling is done with (nearly) the same finite
timeout.
For a short explanation how the I/O loop is working, see
http://docs.libuv.org/en/latest/design.html#the-i-o-loop.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem : Dereference of null pointer @ 1769.
Diagnostic : Real issue.
Rationale : It seems buffer could be null. Not sure, though.
Resolution : Check for buffer null.
This resolution was chosen as it will always work.
But it could be that buffer can't really be null at that
point. autocmd_win is ruled out by close_window, so that
can't be the case. I'm not sure if other windows without
buffers are possible, so leaving it this way.
If it's confirmed buffer can't be null, resolution through
an assert would be possible and this would be FP, not RI.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem : Dead initialization @ 1119.
Diagnostic : Real issue.
Rationale : `obj` is immediately assigned another value through
GET_CONFIG_VALUE macro.
Resolution : Don't initialize.
Helped-by: oni-link <knil.ino@gmail.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Problem : Dead initialization @ 1109.
Diagnostic : Real issue.
Rationale : `obj` is immediately assigned another value through
GET_CONFIG_VALUE macro.
Resolution : Don't initialize.
Helped-by: oni-link <knil.ino@gmail.com>
|