| Commit message (Collapse) | Author | Age |
... | |
| | |
| | |
| | |
| | |
| | |
| | | |
- One can now manually close the in-pipe, without having to tear down the
job.
- One can be notified of write success/failure.
|
| | |
| | |
| | |
| | |
| | | |
Sometimes a wbuffer is not supposed to be free()'d (such as when it comes
from a constant (possibly static) string, for example.
|
| | |
| | |
| | |
| | | |
Now modules using the wstream can find out what's happening to their writes.
|
| | |
| | |
| | |
| | | |
Used to wait synchronously for a job to end.
|
|/ /
| |
| |
| | |
Minor fixes
|
|\ \
| | |
| | | |
remove gettimeofday() usage
|
| | |
| | |
| | |
| | | |
There are no more uses of gettimeofday, so remove the check in CMake.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
gettimeofday() is not portable, replace with os_hrtime() wherever possible.
The new code should behave equivalently to the old implementation.
Because of this, HAVE_GETTIMEOFDAY is no longer necessary To be able to
handle double clicks.
|
| | |
| | |
| | |
| | |
| | | |
gettimeofday() is not portable. I suspect os_hrtime() is also better as a
seed than gettimeofday() or time() were.
|
| | |
| | |
| | |
| | | |
Was removed in #699 but actually doesn't have anything to do with security.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Should fix the following travis error:
/usr/bin/ld: /opt/neovim-deps/lib/libluajit-5.1.a(lj_err.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/opt/neovim-deps/lib/libluajit-5.1.a: could not read symbols: Bad value
|
| | |
| | |
| | |
| | |
| | |
| | | |
Fixes up gcc 4.1 (not specifically a supported compiler but it's standard
for varargs anyway so it's good to have it included and depend less on
implicit includes).
|
|\ \ \
| | | |
| | | | |
func_attr: clang/icc support NONNULL_* attr
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Both clang and (apparently) icc support the nonnull attribute. So I'm not
sure why it wasn't enabled in the first place.
- clang: http://clang-analyzer.llvm.org/annotations.html#attr_nonnull
- icc: https://software.intel.com/en-us/forums/topic/280290 (not conclusive
evidence, but the best I could find, lacking docs)
|
|\ \ \
| |/ /
|/| | |
Fix some memory leaks in job.c and provider.c
|
| | |
| | |
| | |
| | |
| | | |
Free the data memory of process and pipe handles in the close callback
for a job.
|
|/ /
| |
| |
| |
| | |
If no channel can be found for a method, free argument arg before
returning.
|
|\ \
| |/
|/| |
Add unit tests for buffer.c and fileio.c
|
| | |
|
| | |
|
|/ |
|
|\ |
|
| |
| |
| |
| |
| |
| | |
- it makes no sense for these functions to take NULL pointers
- if `localtime()` on Windows returns a NULL pointer, the old code would try
to dereference it.
|
| |
| |
| |
| |
| |
| | |
gettimeofday() doesn't exist on Windows, as reported by @equalsraf. It seems
a call to time() would be sufficient here, as only the seconds since the
UNIX epoch are needed.
|
|/
|
|
| |
Include what you use, also in the positive direction.
|
|\ |
|
| | |
|
| |
| |
| |
| | |
Removes the STARTUPTIME define.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Allow globals.h to be included without including vim.h. Another small piece
of the puzzle of dismantling vim.h.
Moving some extra `#define`'s to globals.h is no better than having them in
vim.h. We should, in a later PR, move them to the file where they belong or
to a separate `constants.h` or something.
|
| |
| |
| |
| | |
The upcoming decoupling of vim.h and globals.h needs this to compile.
|
| |
| |
| |
| |
| |
| | |
Reuse the profiling functions to implement the startuptime functions.
Decreases our dependency on `gettimeofday()` and thus gets us a little bit
closer to a clean port to Windows.
|
|/
|
|
|
| |
It's a better place to put it. Also slightly documented and reformatted, but
not changed.
|
| |
|
|
|
|
| |
As discussed here: https://github.com/neovim/neovim/pull/941/files#r15026398
|
|\ |
|
| |
| |
| |
| | |
This is required to run some tests of the python client
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Remove all *_set_defer methods and the 'defer' flag from rstream/jobs
- Added {signal,rstream,job}_event_source functions. Each return a pointer that
represent the event source for the object in question(For signals, a static
pointer is returned)
- Added a 'source' field to the Event struct, which is set to the appropriate
value by the code that created the event.
- Added a 'sources' parameter to `event_poll`. It should point to a
NULL-terminated array of event sources that will be used to decide which
events should be processed immediately
- Added a 'source_override' parameter to `rstream_new`. This was required to use
jobs as event sources of RStream instances(When "focusing" on a job, for
example).
- Extracted `process_from` static function from `event_process`.
- Remove 'defer' parameter from `event_process`, which now operates only on
deferred events.
- Refactor `channel_send_call` to use the new lock mechanism
What changed in a single sentence: Code that calls `event_poll` have to specify
which event sources should NOT be deferred. This change was necessary for a
number of reasons:
- To fix a bug where due to race conditions, a client request
could end in the deferred queue in the middle of a `channel_send_call`
invocation, resulting in a deadlock since the client process would never
receive a response, and channel_send_call would never return because
the client would still be waiting for the response.
- To handle "event locking" correctly in recursive `channel_send_call`
invocations when the frames are waiting for responses from different
clients. Not much of an issue now since there's only a python client, but
could break things later.
- To simplify the process of implementing synchronous functions that depend on
asynchronous events.
|
| |
| |
| |
| |
| |
| | |
Also changed the default log level to INFO so developers won't end up with big
log files without asking explicitly(DLOG statements were placed in really "hot"
code)
|
| |
| |
| |
| |
| | |
The `inchar` function could enter an infinite loop if there are events pending
to be processed when an interrupt is received.
|
| |
| |
| |
| |
| | |
This is for compatibility with python-vim interface: When passing an end index
with a value higher than the last index, assume the `include_end` flag
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reimplements the '+'/'*' clipboard registers(both are aliases to the same
register, no dedicated storage for the X11 selection) on top of the provider
infrastructure.
This adds two new 'unnamedclip' option, has the same effect of setting
'clipboard' to 'unnamed/unnamedplus' in vim
The 'clipboard' option was not reused because all values(except 'unnamedplus')
seem to be useless for Neovim, and the code to parse the option was relatively
big. The option remains for vim compatibility but it's silently ignored.
|
| |
| |
| |
| |
| |
| |
| |
| | |
This uses the provider/scripting infrastructure to reintroduce python support
through the msgpack-rpc API.
A new 'initpython' option was added, and it must be set to a command that will
bootstrap the python provider the first time it's needed.
|
| |
| |
| |
| |
| |
| | |
This uses the provider module infrastructure to implement common code for
vimscript commands/functions that need to communicate with external
interpreters, eg: pydo, rubydo, pyfile, rubyfile, etc.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Introducing the concept of providers: co-processes that talk with the editor
through the remote API and provide implementation for one or more core
services.
The `provider_register` function and it's API wrapper can be used by channels
that want to self-register as a service provider.
Some old builtin vim features will be re-implemented as providers. The
`provider_has_feature` function is used to check if a provider
implementing a certain feature is available(It will be called by the `has`
vimscript function to check for features in a vim-compatible way)
This implements the provider module without exposing any extension points, which
will be done in future commits.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- All functions that require a channel id will fail when the channel was
disabled
- Rewrite `call_stack_unwind` as `call_set_error`. It will now disable the
channel and set error on all frames. The stack will be unwinded automatically
while the involved functions exit.
- Remove `disable_channel` function. If channels are disabled, they will be
closed as soon as possible
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
This is required to handle broadcasting when the first write fails.
Ref: https://github.com/tarruda/neovim/commit/11916b6b595421ce2ece10f7aa40757cc4937c0c#commitcomment-6792287
|