| Commit message (Collapse) | Author | Age |
... | |
| |
|
|
|
|
|
|
|
|
|
| |
Problem: Insert mode completion with complete() may have CTRL-L work like
CTRL-P.
Solution: Handle completion with complete() differently. (Yasuhiro
Matsumoto, Christian Brabandt, Hirohito Higashi)
https://github.com/vim/vim/commit/v7-4-653
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
This fixes missing clipboard support for `:redir`
Helped-By: Michael Reed <m.reed@mykolab.com>
Helped-By: Scott Prager <splinterofchaos@gmail.com>
|
|
|
|
|
| |
When clipboard=unnamed and put over visual selection, reduces number of
provider calls from 6 to 2. Also add test.
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
[RFC] terminal: Handle loss of focus in event loop.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
|
|
|
|
|
|
|
|
| |
Refactor summary:
- foldinfo_T.fi_lnum: int --> linenr_T
Reorder field for optimal packing.
- foldAddMarker(..., markerlen): int --> size_t
* foldstartmarkerlen: int --> size_t
- foldDelMarker(..., markerlen): int --> size_t
* foldendmarkerlen: int --> size_t
Helped-by: oni-link <knil.ino@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Switching cursor off is only necessary in two occasions:
- When redrawing to avoid terminal flickering
- When the editor is busy
The first can now be handled by the TUI, so most calls to ui_cursor_off can be
removed from the core.
So, before this commit it was only necessary to switch the cursor off to notify
the user that nvim was running some long operation. Now the cursor_{on,off}
functions have been replaced by busy_{stop,start} which can be handled in a
UI-specific way(turning the cursor off or showing a busy indicator, for
example).
To make things even more simpler, nvim is always busy except when waiting for
user input or other asynchronous events: It automatically switches to a non-busy
state when the event loop is about to be entered for more than 100 milliseconds.
`ui_busy_start` can be called when its not desired to change the busy state in
the event loop (As its now done by functions that perform blocking shell
invocations).
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
| |
Refactoring summary:
- MB_STRNICMP: Inlined.
- MB_STRNCMP: Inlined.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Problem: Memory access error. (Dominique Pelle)
Solution: Update tpos. (Christian Brabandt)
https://code.google.com/p/vim/source/detail?r=v7-4-514
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
Problem: In Insert mode, after inserting a newline that inserts a comment
leader, CTRL-O moves to the right. (ZyX) Issue 57.
Solution: Correct the condition for moving the cursor back to the NUL.
(Christian Brabandt)
https://code.google.com/p/vim/source/detail?r=v7-4-492
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
t_colors should not be checked when abstract_ui is active, because nvim UI is
not limited to a terminal.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace code like this
```c
func() {
if (cond) {
...
...
...
}
return ret;
}
```
```c
for (...) {
if (cond) {
...
...
...
}
}
```
with
```c
func() {
if (!cond) {
return ret;
}
...
...
...
}
```
```c
for (...) {
if (!cond) {
continue;
}
...
...
...
}
```
|
|
|
|
|
|
|
|
| |
Problem : Dereference of null pointer @ 3247.
Diagnostic : Multithreading issue.
Rationale : Problem only occurs if global `ctrl_x_mode` is modified
while calling function is executing.
Solution : Use local copy instead of global.
|
|\
| |
| | |
vim-patch:7.4.425,435,467,472,473,478
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
vim-patch:7.4.435
Problem: Line formatting behaves differently when 'linebreak' is set.
(mvxxc)
Solution: Disable 'linebreak' temporarily. (Christian Brabandt)
https://code.google.com/p/vim/source/detail?r=v7-4-435
|
| |
| |
| |
| | |
This is not being used and should not be part of the core anyway.
|
| | |
|
| |
| |
| |
| |
| | |
These functions only used to call another os_* function, so remove them and
replace all occurences in the project.
|
|/
|
|
|
|
|
| |
Two new functions, `event_enable_deferred()`/`event_disable_deferred()` have to
be called by code that is capable of handling asynchronicity. User-dialog states
like "press ENTER to continue" or the swap file confirmation no longer will
generate K_EVENT.
|
| |
|
|
|
|
|
|
|
|
| |
Problem : Result of operation is garbage or undefined @ 7460.
Diagnostic : Multithreading issue.
Rationale : Problem occurs if any of globals `enc_utf8`, `p_deco is
modified while function is executing.
Resolution : Use local copy of globals.
|
|
|
|
|
|
|
|
| |
Problem : Assigned value is garbage or undefined @ 6359.
Diagnostic : Multithreading issue.
Rationale : Problem only occurs if global `State` changes while
function is executing.
Resolution : Use local copy of global in function.
|
|
|
|
|
|
|
|
|
| |
Problem : Uninitialized argument value @ 6296.
Diagnostic : False positive.
Rationale : Error occurs if n <= 1. That's not possible because
n >= 1 due to `MB_BYTE2LEN` postcondition and n != 1
because we are in the else branch.
Resolution : Assert n > 1.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problems : Dereference of null pointer @ 3615.
Dereference of null pointer @ 3764.
Diagnostic : False positives.
Rationale : `ins_buf` is local static, so maintains value between calls.
This function will be called first when `compl_started` is
false, and in that case it initializes `ins_buf`. After
that, it can be called multiple times with `compl_started`
true, where `ins_buf` will be updated but not to null.
So, when arriving to both points, `ins_buf` should never be
null.
Resolution : Assert `ins_buf` at both points.
|
|
|
|
|
|
|
|
|
| |
Problem : Dereference of null pointer @ 3234.
Diagnostic : False positive.
Rationale : `wp` is local static, so maintains value between calls.
First time function is called for a given flag will have
`buf == curbuf`, implying `wp` initialization.
Resolution : Assert variable always having been initialized.
|
|
|
|
|
|
|
|
| |
Problem: Omni complete popup drawn incorrectly.
Solution: Call validate_cursor() instead of check_cursor(). (Hirohito
Higashi)
https://code.google.com/p/vim/source/detail?r=v7-4-440
|
|
|
|
|
|
|
|
| |
Problem: Inserting text for Visual block mode, with cursor movement,
repeats the wrong text. (Aleksandar Ivanov)
Solution: Reset the update_Insstart_orig flag. (Christian Brabandt)
https://code.google.com/p/vim/source/detail?r=v7-4-407
|
|
|
|
|
|
|
|
| |
Problem: Get u_undo error when backspacing in Insert mode deletes more than
one line break. (Ayberk Ozgur)
Solution: Also decrement Insstart.lnum.
https://code.google.com/p/vim/source/detail?r=v7-4-381
|
|
|
|
|
|
|
|
| |
Problem: "4gro" replaces one character then executes "ooo". (Urtica
Dioica)
Solution: Write the ESC in the second stuff buffer.
https://code.google.com/p/vim/source/detail?r=v7-4-387
|
|
|
|
|
|
|
|
|
| |
Problem: Popup menu flickers too much.
Solution: Remove the forced redraw. (Hirohito Higashi)
https://code.google.com/p/vim/source/detail?r=v7-4-376
Includes: vim-patch:7.4.357 vim-patch:7.4.367 vim-patch:7.4.376
|
| |
|