| Commit message (Collapse) | Author | Age |
|
|
|
|
|
| |
Move files from src/ to src/nvim/.
- src/nvim/ becomes the new root dir for nvim executable sources.
- src/libnvim/ is planned to become root dir of the neovim library.
|
|
|
|
|
|
| |
The vimscript object conversion function was adapted from the version found in
'if_py_both.h' in the upstream source. It was also required to re-add the
`dict_lookup` function that was lost during the initial import.
|
|
|
|
| |
Reported by valgrind
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
Macro-based log utility for Neovim
|
| |
| |
| |
| | |
Replace localtime() with os_localtime_r() in `eval.c` and `undo.c`.
|
|/ |
|
|
|
|
|
|
|
| |
reverting broad cosmetic/style change because:
- increases merge-conflicts
- increases overhead of merging upstream Vim patches
- reasons for change are ambiguous, so default to no change
|
|
|
|
|
|
|
|
| |
Problem: Using just "$" does not cause an error message.
Solution: Check for empty environment variable name.
(Christian Brabandt)
https://code.google.com/p/vim/source/detail?r=00228400629e28384f7f52556c3c119ba0d0a44d
|
| |
|
|
|
|
|
|
|
|
|
| |
Problem: Using exists() on a funcref for a script-local function
does not work.
Solution: Translate <SNR> to the special byte sequence.
Add a test.
https://code.google.com/p/vim/source/detail?r=1a5ed2626b26a982e307a206572121a557adf709
|
|
|
|
|
|
|
| |
* Remove unnecessary else
* Move variable declaration nearer to point of use
* Add missing curly brackets
* Comment style
|
|
|
|
| |
Clean up the use of rettv_list_alloc and remove error checks.
|
|
|
|
| |
Clean up the use of list_append_tv and remove error checks.
|
|
|
|
| |
Clean up the use of list_append_number and remove error checks.
|
|
|
|
|
| |
Rename `shorten_fname` -> `path_shorten_fname`
Rename `shorten_fname1` -> `path_shorten_fname_if_possible`
|
|
|
|
|
|
|
|
| |
Problem: The string returned by submatch() does not distinguish between a
NL from a line break and a NL that stands for a NUL character.
Solution: Add a second argument to return a list. (ZyX)
https://code.google.com/p/vim/source/detail?r=a63d0cd691dc925283815d17d62f4e948d723a59
|
|
|
|
|
|
|
| |
Problem: Can't call a global function with "g:" in an expression.
Solution: Skip the "g:" when looking up the function.
https://code.google.com/p/vim/source/detail?r=8ec9d2196bee0c5108f2d2c196a660a7f4e5f29f
|
|
|
|
|
|
|
|
|
| |
Problem: Can't define a function starting with "g:". Can't assign a
funcref to a buffer-local variable.
Solution: Skip "g:" at the start of a function name.
Don't check for colons when assigning to a variable.
https://code.google.com/p/vim/source/detail?r=00acac0af680c2d8c82db5258474b121a5908926
|
|
|
|
|
|
|
|
|
| |
Though correct (to my understanding), some of the casts introduced in
previous commits could lead to confusion, by casting only the first
expression component instead of the whole expression.
This fixes that, parenthesizing casted expressions, except where
operator precedence rules make it unneccesary.
|
|
|
|
| |
Clean up the use of list_append_string and remove error checks.
|
|
|
|
| |
Clean up the use of list_append_dict and remove error checks.
|
|
|
|
|
| |
Remove remnants of support for systems including
__EMX__, MSDOS, OS2, AMIGA and MORPHOS.
|
|
|
|
|
| |
Use `xcalloc` instead.
Inline `alloc_tv` and `alloc_string_tv` in eval.c
|
|
|
|
|
|
|
|
|
|
| |
Problem: It is possible to define a function with a colon in the name. It
is possible to define a function with a lower case character if a
"#" appears after the name.
Solution: Disallow using a colon other than with "s:". Ignore "#" after the
name.
https://code.google.com/p/vim/source/detail?r=6bc874e4789a0f912b4fd6b23afecf19d80b1605
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Today's compilers generate shift instructions to perform division and
multiplications by powers of 2 [1]. `(x >> 1)` looks straightforward enough, but
if x is signed the code will fail when x < 0. The compiler knows better: use
`x / 2`.
That's why we have code like this:
(long)((long_u)Rows >> 1))
instead of the cleaner version that generates the same or better machine code:
Rows / 2
[1] http://goo.gl/J4WpG7
|
|
|
|
|
|
|
|
|
|
| |
- alloc_tabpage()
- win_alloc_lines()
- win_alloc_aucmd_win()
- new_frame()
- win_alloc()
TODO: don't handle OOM after calls to dict_alloc()
|
|
|
|
|
|
|
|
| |
Problem: When some patches was not included has("patch-7.4.123") may return
true falsely.
Solution: Check for the specific patch number.
https://code.google.com/p/vim/source/detail?r=71b165a378ad580818f6d497ecf0f8ad054a9683
|
|
|
|
|
| |
Fix uses of plain "%ld" within N_():
- Replace "%ld" with "%" PRId64.
|
|
|
|
|
|
| |
Fix uses of plain "%ld" within EMSGN():
- Replace "%ld" with "%" PRId64.
- No argument cast needed. EMSGN() will take care of that.
|
|
|
|
|
|
| |
Fix uses of localized "%ld" within smsg():
- Replace "%ld" with "%" PRId64.
- Cast corresponding argument to (int64_t).
|
|
|
|
|
|
| |
Fix uses of plain "%ld" within sprintf():
- Replace "%ld" with "%" PRId64.
- Cast corresponding argument to (int64_t).
|
|
|
|
|
|
|
| |
Problem: It's not that easy to check the Vim patch version.
Solution: Make has("patch-7.4.123") work. (partly by Marc Weber)
https://code.google.com/p/vim/source/detail?r=a44087db72386d080e9da870d751daf498004be8
|
|
|
|
| |
The argument vector is now freed in the `close_cb` function in job.c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of a single 'job read' callback, job control consumers need to provide
callbacks for "stdout read", "stderr read" and "exit". For vimscript, the
JobActivity autocommand is still used to handle every job event, for example:
```vim
:let srv1_id = jobstart('netcat-server-1', 'nc', ['-l', '9991'])
:let srv2_id = jobstart('netcat-server-2', 'nc', ['-l', '9991'])
function JobEvent()
" v:job_data[0] = the job id
" v:job_data[1] = the event type, one of "stdout", "stderr" or "exit"
" v:job_data[2] = data read from stdout or stderr
if v:job_data[1] == 'stdout'
let str = 'Message from job '.v:job_data[0].': '.v:job_data[2]
elseif v:job_data[1] == 'stderr'
let str = 'Error message from job '.v:job_data[0].': '.v:job_data[2]
else
" Exit
let str = 'Job '.v:job_data[0].' exited'
endif
call append(line('$'), str)
endfunction
au JobActivity netcat-server-* call JobEvent()
```
And to see messages from 'job 1', run in another terminal:
```sh
bash -c "while true; do echo 123; sleep 1; done" | nc localhost 9991
```
|
|
|
|
|
| |
Removed modelines are better than modelines that differ from file to
file.
|
| |
|
|
|
|
|
|
|
|
| |
Problem: Can't get the command that was used to start Vim.
Solution: Add v:progpath. (Viktor Kojouharov)
https://code.google.com/p/vim/source/detail?r=d2286df8719d6e99c743e3bf6ac14d1f9debc84d
|
|
|
|
|
|
|
|
| |
Problem: Using ":let" for listing variables and the second one is a
curly braces expression may fail.
Solution: Check for an "=" in a better way. (ZyX)
https://code.google.com/p/vim/source/detail?r=839cca5ec18d560e3714065e54ed38b6e812aaf7
|
|
|
|
|
|
|
|
| |
Problem: It's not easy to remove duplicates from a list.
Solution: Add the uniq() function. (LCD)
https://code.google.com/p/vim/source/detail?r=ddc3f32a4b2191f829206322d46f0e9c7e365e22
|
|
|
|
|
|
|
|
| |
Problem: Escaping a file name for shell commands can't be done without a
function.
Solution: Add the :S file name modifier.
https://code.google.com/p/vim/source/detail?r=40f18a1c1592c8b4047f6f2a413557f48a99c55f
|
|
|
|
|
|
|
| |
Problem: Memory leak when giving E853.
Solution: Free the argument. (Dominique Pelle)
https://code.google.com/p/vim/source/detail?r=04c4ef8c0a1b757494500e46400552b135135e94
|
| |
|
| |
|
| |
|
| |
|