| Commit message (Collapse) | Author | Age |
... | |
| | |
|
|/
|
|
|
|
|
| |
Problem: No error for eval('$').
Solution: Check for empty name. (Yasuhiro Matsumoto)
https://github.com/vim/vim/commit/v7-4-574
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For any of these functions, if {cmd} is a string, execute
"&shell &shellcmdflag '{cmd}'", or simply {cmd} if it's a list.
In termopen(), if the 'name' option is not supplied, try to guess using
'{cmd}' (string) or {cmd}[0] (list). Simplify ex_terminal to use the
string form of termopen().
termopen: get name from argument
Convert list_to_argv to tv_to_argv.
Helped-by: Björn Linse <@bfredl>
Helped-by: oni-link <knil.ino@gmail.com>
Helped-by: Thiago de Arruda <@tarruda>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Old behaviour: termopen('cmd') would run `&shell &shcf "cmd"`, which
caused the functional tests to fail on some systems due to the process
not "owning" the terminal. Also, it is inconsistent with jobstart().
Modify termopen() so that &shell is not invoked, but maintain the old
behaviour with :terminal. Factor the common code for building the
argument vector from jobstart() and modify the functional tests to call
termopen() instead of :terminal (fixes #2354).
Also:
* Add a 'name' option for termopen() so that `:terminal {cmd}` produces
a buffer named "term//{cwd}/{cmd}" and termopen() users can customize
the name.
* Update the documentation.
* Add functional tests for `:terminal` sinse its behaviour now differs
from termopen(). Add "test/functional/fixtures/shell-test.c" and move
"test/functional/job/tty-test.c" there, too.
Helped-by: Justin M. Keyes <@justinmk>
|
|
|
|
|
|
|
| |
Problem: After 7.4.630 the problem persists.
Solution: Also skip redo when calling a user function.
https://github.com/vim/vim/commit/v7-4-633
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Refactor summary:
- extern int opcount --> extern long opcount
- bool find_decl(..., int len, ...) --> bool find_decl(..., size_t len, ...)
* int find_ident_under_cursor(...) --> size_t find_ident_under_cursor(...)
- int find_ident_at_pos(...) --> size_t find_ident_at_pos(...)
- int modify_fname(..., int *usedlen, ..., int *fnamelen) --> int modify_fname(..., size_t *usedlen, ..., size_t *fnamelen)
* char_u *eval_vars(..., int *usedlen, ...) --> char_u *eval_vars(..., size_t *usedlen, ...)
- int find_cmdline_var(..., int *usedlen) --> ssize_t find_cmdline_var(..., size_t *usedlen)
- static char_u *repl_cmdline(..., int srclen, ...) --> static char_u *repl_cmdline(..., size_t srclen, ...)
- bool get_visual_text(..., int *lenp) --> bool get_visual_text(..., size_t *lenp)
* char_u *find_file_name_in_path(..., int len, ...) --> char_u *find_file_name_in_path(..., size_t len, ...)
- static char_u *eval_includeexpr(..., int len) --> static char_u *eval_includeexpr(..., size_t len)
- char_u *find_file_in_path(..., int len, ...) --> char_u *find_file_in_path(..., size_t len, ...)
* char_u *find_file_in_path_option(..., int len, ...) --> char_u *find_file_in_path_option(..., size_t len, ...)
- char_u *find_directory_in_path(..., int len, ...) --> char_u *find_directory_in_path(..., size_t len, ...)
* int spell_move_to(...) --> size_t spell_move_to(...)
- int spell_check(...) --> size_t spell_check(...)
- static int spell_bad_len --> static size_t spell_bad_len
- void find_pattern_in_path(..., int len, ...) --> void find_pattern_in_path(..., size_t len, ...)
Helped-by: Justin M. Keyes <justinkz@gmail.com>
|
| |
|
| |
|
| |
|
|
|
|
| |
fixes #2458
|
|
|
|
|
| |
Reviewed-by: Michael Reed <m.reed@mykolab.com>, Daniel Hahler <github@thequod.de>
Helped-by: Daniel Hahler <github@thequod.de>
|
|\
| |
| |
| |
| |
| | |
Reviewed-by: Scott Prager <splinterofchaos@gmail.com>
Reviewed-by: Michael Reed <m.reed@mykolab.com>
Reviewed-by: Eliseo Martínez <eliseomarmol@gmail.com>
|
| |
| |
| |
| |
| |
| | |
Without the casts*, the compiler rightly warns about the os_getenv
losing the qualifier. This refactor adds a variable to manage this
properly, and renames the original variables to increase clarity.
|
| | |
|
| | |
|
| |
| |
| |
| | |
See: #459
|
|\ \
| | |
| | | |
Fix a few uninitialized variable warnings.
|
| |/ |
|
|/ |
|
|
|
|
|
|
|
|
|
|
| |
This spares some work and also prevents list_join() from calling ga_init()
with a growsize of 0 which would lead to the nvimlog being littered with:
[warning @ ga_set_growsize:64] 17675 - trying to set an invalid ga_growsize: 0
Also in Vim 7.4.702
https://github.com/vim/vim/commit/5216f767d4070d0085de6fa1391e6f2991c1baa5
|
|
|
|
|
|
| |
Implement functions for spawning, destroying, and listing active
servers, and add server_address_list() to msgpack_rpc/server.c for the
serverlist() vimL function.
|
|
|
|
|
|
| |
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`.
|
|
|
|
|
|
| |
- Properly save job event deferring state for recursive calls
- Disable breakcheck while running. Breakcheck can invoke job callbacks
in unexpected places.
|
| |
|
|
|
|
|
|
| |
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`
|
|
|
|
|
|
|
|
|
|
|
| |
In the fallowing functions, use get_tv_string() to safely avoid a NULL
pointer dereference.
* rpcstart
* rpcrequest
* rpcnotify
* jobstart
fixes #2321
|
|
|
|
| |
fixes #2286
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem : Use-after-free @ 15081.
Diagnostic : Multithreading issue.
Rationale : `get_dict_callback` can return NULL on two different
cases: 1) when the dict doesn't contain the given key;
this case is not considered an error. 2) when the key
exists but there's some problem with its value; this is
considered an error.
Then, code calling `get_dict_callback` in
`common_job_callbacks`, as well as code calling
`common_job_callbacks`, uses `did_emsg` to distinguish
between error/non-error cases.
Suggested error path presumes an error condition within
`common_job_callbacks`, with `did_emsg` being true, but
then being false just after returning to calling code in
`f_termopen`.
That, clearly, could only happen if another thread run in
between those points.
Resolution : Refactor `get_dict_callback` and `common_job_callbacks`, so
that they clearly distinguish between error/non-error
situations, without recurring to globals.
|
|
|
|
|
|
|
|
| |
Problem : Dereference of null pointer @ 10812.
Diagnostic : False positive.
Rationale : `args->lv_first` can't be NULL, as we have just stated
above that that there's at least one item.
Resolution : Assert.
|
|
|
|
|
| |
A call to `event_poll` is required to ensure the exit callback from the last job
is invoked.
|
|
|
|
|
|
|
|
| |
Due to the way vimscript garbage collection handles cyclic references, its not
possible to rely on incrementing `dv_refcount` to prevent dicts still used
internally from being collected: If a object with dv_refcount > 0 isn't
reachable by vimscript code, it will be freed when `garbage_collect()` is
called. Add the `internal_refcount` field to prevent this.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
Use the `is_user_job` to ensure that the job was started by `jobstart` or
`termopen`.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
| |
- Make it possible to call or unref ufunc_T pointers directly.
- Keep refcount of named functions, and stop them from being deleted if the
refcount is greater than 1.
|
|
|
|
| |
- Free memory allocated for job data when the job table is full.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
Add missing parentheses and whatnot, move dangling comment, etc. Some
specific items worth mentioning:
Fixed some references to non-existent tags, found via `make html`
msgpack_rpc/channel.c:
ELOG already prefixes each line with "error @ ..."
|
|
|
|
|
|
|
|
|
|
|
| |
This commit pulls the some environment-variable handling functions out of
misc1.c and in to os/env.c. Previously submited as #1231, this is the start of
a patch series that does that work based on a more up-to-date master branch.
Major tasks accomplished:
- move functions and fix includes
- fix clint/clang analysis warnings
- correct documentation comments
|
|
|
|
|
| |
'ttybuiltin' was removed and *_BUILTIN_TCAPS was made into dead code in
PR #1820.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Cannot append a list of lines to a file.
Solution: Add the append option to writefile(). (Yasuhiro Matsumoto)
https://code.google.com/p/vim/source/detail?r=v7-4-503
-Ported old legacy test over to
test/functional/legacy/writefile_spec.lua
-Tests for mapping and signs from the original patch were removed since
they have nothing to do this with feature
Tested with: make oldtest, make test on OS X.
Signed-off-by: Perry Hung <iperry@gmail.com>
|
|
|
|
| |
The bodies of f_browse() and f_browsedir() were identical.
|
|
|
|
| |
This avoids recompiling every c file after comitting.
|
|
|
|
|
|
|
|
| |
Problem: Using getcurpos() after "$" in an empty line returns a negative
number.
Solution: Don't add one when this would overflow. (Hirohito Higashi)
https://code.google.com/p/vim/source/detail?r=v7-4-578
|
|
|
|
| |
This allows sending binary data that is not newline terminated
|