| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
| |
|
|
|
|
|
|
|
|
|
| |
If you Google for this phrase found in the Vim documentation you'll find
almost exclusively hits from the Vim documentation. I think changing
"halfway a line" to "halfway through a line" makes more sense.
There seems to be an pervasive odd use of the word 'halfway' in the
original docs which I'm updating everywhere.
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
Problem: Appending a block in the middle of a tab does not work correctly
when virtualedit is set.
Solution: Decrement spaces and count, don't reset them. (James McCoy)
https://code.google.com/p/vim/source/detail?r=v7-4-559
|
|
|
|
|
|
|
|
| |
Problem: When using "vep" a mark is moved to the next line. (Maxi Padulo,
Issue 283)
Solution: Decrement the line number. (Christian Brabandt)
https://code.google.com/p/vim/source/detail?r=v7-4-521
|
|
|
|
|
|
|
|
|
|
| |
Problem : Unchecked return value (CHECKED_RETURN) @ 2644.
Diagnostic : Real issue.
Rationale : Other `u_save` invocations are checked, and there's no
reason to think this invocation could not fail.
Resolution : Check and return if failed (other previous checks in the
same function just return, without reporting error, so
we just do the same).
|
|
|
|
|
|
|
|
|
|
|
| |
Problem : Array access (via field 'y_array') results in a null pointer
dereference @ 4487.
Diagnostic : Real issue.
Rationale : If the array was previously freed and the size of the array
(y_current->y_size) was not updated to zero, the loop @4486
could be entered and a NULL pointer would be dereferenced.
Resolution : Use free_yank_all() to take care of the NULL check and
to free the current yank register.
|
|
|
|
|
| |
Patch provided by Christian Brabandt
Improved by oni-link
|
|\
| |
| | |
replace copy_spaces and copy_chars functions with equivalent memset.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Update the doxygen comments.
- Use more descriptive types.
- Localize variables.
- Find the '\n' with memchr instead of a for loop.
- Remove `if (size)` checks before memmove
since memmove(dst,src,0) is a noop.
- Use memcpy instead since the pointers don't alias.
- Use xmemdupz instead of vim_strnsave.
- xrealloc instead of xmalloc/memcpy.
- Use memcnt/xmemscan/memchrsub.
|
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
|
| |
|
|
|
|
|
| |
This allows to configure which of '*' and '+' should be used for
the unnamed clipboard, and is consistent with vim.
|
| |
|
| |
|
| |
|
|
|
|
| |
Also move read_error_exit to os/input.c
|
|
|
|
|
| |
These functions only used to call another os_* function, so remove them and
replace all occurences in the project.
|
| |
|
|
|
|
|
| |
Replace references to provider_call/provider_has with the new functions
eval_call_provider/eval_has_provider.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Several opart_T members like use_reg_one, end_adjusted, empty,
is_VIsual, and block_mode, only ever store TRUE or FALSE, so make this
constraint explicit by changing them to bools, and TRUE to true and
FALSE to false in the context of their uses.
The member, inclusive, has several other uses such as in arithmetic
equations and one inequality, but every single assignment (obtained with
'grep -r "inclusive \\="') sets it to either TRUE or FALSE.
This also implies that the inequality, "oap->end.coladd <
oap->inclusive", can only be true when coladd==0 and inclusive==true, so
test for that instead.
For consistency, change the first argument of findpar (which ends up
being inclusive) to bool.
Include stdbool.h for consistency with issue #918.
This commit shrinks the size of oparg_T from 128 bytes to 112 (-13%) on
my machine.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problems: Result of operation is garbage or undefined @ 5087.
http://neovim.org/doc/reports/clang/report-2e3118.html#EndPath
Result of operation is garbage or undefined @ 5149.
Diagnostic: Multithreading issues.
Rationale : All reported problems can only occur if accesed globals
change state while executing function, which could only
happen in a multithreaded environment.
Resolution: Use local variables (copy globals on entry).
Note that this change alters function semantics, as now
function only depends on global values at entry time.
This shouldn't be a problem, though, as new semantics should
be in fact better.
|
|
|
|
|
|
|
|
|
| |
Problem: Argument with 'nonnull' attribute passed null @ 3540.
http://neovim.org/doc/reports/clang/report-fc14e0.html#EndPath.
Diagnostic: False potitive.
Rationale : `count` should be >= 2 by function precondition.
Resolution: Assert precondition.
|
|
|
|
|
|
|
| |
Problem: Visual block insert breaks a multi-byte character.
Solution: Calculate the position properly. (Yasuhiro Matsumoto)
https://code.google.com/p/vim/source/detail?r=v7-4-408
|
|\
| |
| | |
Remove FOR_ALL_WINDOWS and replace with FOR_ALL_WINDOWS_IN_TAB(curtab)
|
| | |
|
|/ |
|
|
|
|
|
|
| |
- Move helpers that are specific to API types to api/private/helpers.{c,h}
- Include headers with generated declarations
- Delete unused macros
|
| |
|
|
|
|
|
|
| |
This is required by the msgpack-RPC specification. Also, the
send_call/send_event functions were refactored to accept a variable number of
arguments
|
| |
|
|
|
|
|
|
|
| |
Problem: Relative numbering not updated after a linewise yank. Issue 235.
Solution: Redraw after the yank. (Christian Brabandt)
https://code.google.com/p/vim/source/detail?r=6d984caa0409fd284722c44cb09a0a2b5360bd4f
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|