| Commit message (Collapse) | Author | Age |
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: The screen.c file is much too big.
Solution: Split it in three parts. (Yegappan Lakshmanan, closes vim/vim#4943)
https://github.com/vim/vim/commit/7528d1f6b5422750eb778dfb550cfd0b0e540964
This is an approximation vim-patch 8.1.2057. Applying the patch directly
isn't feasible since our version of screen.c has diverged too much,
however we still introduce drawscreen.c and drawline.c:
- screen.c is now a much smaller file used for low level screen functions
- drawline.c contains everything needed for win_line()
- drawscreen.c contains everything needed for update_screen()
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
| |
| |
| |
| |
| |
| |
| | |
vim-patch:8.1.2082: some files have a weird name to fit in 8.3 characters
Problem: Some files have a weird name to fit in 8.3 characters.
Solution: Use a nicer names.
https://github.com/vim/vim/commit/30e8e73506e4522ef4aebf7d525c0e6ffe8805fd
|
| |
| |
| |
| |
| | |
- reimplement 'winhl' in terms of highlight namespaces
- check for EOF in screen tests (to indicate a likely crash)
|
| |
| |
| | |
Replace grid.h in screen.h and screen.h in buffer.h with grid_defs.h
|
| |
| |
| |
| | |
This matches the code in execute_common(), preventing messages after the
API call from being printed at the wrong column.
|
| | |
|
| |
| |
| |
| |
| | |
- Remove autocmd.h from fileio.h
- Remove normal.h from main.h
- Move bufinfo_T from undo_defs.h to undo.c
|
| |
| |
| |
| | |
Mostly avoids including eval.h, ex_cmds2.h and ex_docmd.h in other
headers.
|
| |
| |
| |
| | |
This avoids including ex_eval.h in any other header, thus preventing
future circular includes.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
vim-patch:8.2.0559: clearing a struct is verbose
Problem: Clearing a struct is verbose.
Solution: Define and use CLEAR_FIELD() and CLEAR_POINTER().
https://github.com/vim/vim/commit/a80faa8930ed5a554beeb2727762538873135e83
|
| |
| |
| | |
Closes #19696
|
|\| |
|
| |
| |
| |
| |
| |
| |
| | |
Problem: Support for user commands is spread out. No good reason to make
user commands optional.
Solution: Move user command support to usercmd.c. Always enable the
user_commands feature.
https://github.com/vim/vim/commit/ac9fb18020d7e8bf16d02d45fbb02cf47328aaf7
|
| |
| |
| |
| | |
The line returned but ml_get_buf() may be freed by another call to
ml_get_buf(), so it is necessary to make a copy.
|
| |
| |
| | |
Co-authored-by: ii14 <ii14@users.noreply.github.com>
|
| |\ |
|
| | | |
|
|\| | |
|
| |/
| |
| |
| | |
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: notomo <notomo.motono@gmail.com>
|
| | |
|
| | |
|
| |
| |
| |
| | |
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Valery Viktorovsky <viktorovsky@gmail.com>
|
| |
| |
| |
| | |
The last commit didn't actually disable V1028 because of a typo.
Fix the typo so it is actually disabled.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Reduce the amount of string allocations and length calculations.
With the following benchmark:
```lua
total = 0
for _ = 1, loops do
local start = now()
vim.api.nvim_cmd({cmd = 'let', args = {'a', '=', '1'}}, {})
total = total + (now() - start)
end
print('nvim_cmd', total / loops)
```
```
hyperfine 'nvim --clean test.lua +source +q'
```
Before: 234.5ms
After: 173.8ms
|
| |
| |
| |
| |
| |
| |
| | |
Problem: Vim9: bool option type is number.
Solution: Have get_option_value() return a different value for bool and
number options. (closes vim/vim#7583)
https://github.com/vim/vim/commit/dd1f426bd617ac6a775f2e7795ff0b159e3fa315
|
| | |
|
| |
| |
| |
| |
| | |
use the MAXSIZE_TEMP_ARRAY + ADD_C pattern instead, as exemplified
by the changes in this commit.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: File for Insert mode is much too big.
Solution: Split off the code for Insert completion. (Yegappan Lakshmanan,
closes vim/vim#4044)
https://github.com/vim/vim/commit/7591bb39d58ece38a5fef984a08ea9012616c1f9
Cherry-pick ins_compl_len() -> get_compl_len() from patch 8.2.4001.
Revert a71c5e9eb98fbb2ca88510269935cdcda37369fc: ctrl_x_mode is no
longer a global variable, so l_ctrl_x_mode is no longer needed.
|
| |
| |
| |
| |
| |
| | |
In case nvim A sends nvim_error_event to nvim B, it would
respond with another nvim_error_event due to unknown
request name. Fix this by adding dummy request handler for now.
|
| | |
|
| | |
|
|\| |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
** Refactor
Previously most functions used to "get" a mark returned a position,
changed the line number and sometimes changed even the current buffer.
Now functions return a {x}fmark_T making calling context aware whether
the mark is in another buffer without arcane casting. A new function is
provided for switching to the mark buffer and returning a flag style
Enum to convey what happen in the movement. If the cursor changed, line,
columns, if it changed buffer, etc.
The function to get named mark was split into multiple functions.
- mark_get() -> fmark_T
- mark_get_global() -> xfmark_T
- mark_get_local() -> fmark_T
- mark_get_motion() -> fmark_T
- mark_get_visual() -> fmark_T
Functions that manage the changelist and jumplist were also modified to
return mark types.
- get_jumplist -> fmark_T
- get_changelist -> fmark_T
The refactor is also seen mainly on normal.c, where all the mark
movement has been siphoned through one function nv_gomark, while the
other functions handle getting the mark and setting their movement
flags. To handle whether context marks should be left, etc.
** Mark View
While doing the refactor the concept of a mark view was also
implemented:
The view of a mark currently implemented as the number of lines between
the mark position on creation and the window topline. This allows for
moving not only back to the position of a mark but having the window
look similar to when the mark was defined. This is done by carrying and
extra element in the fmark_T struct, which can be extended later to also
restore horizontal shift.
*** User space features
1. There's a new option, jumpoptions+=view enables the mark view restoring
automatically when using the jumplist, changelist, alternate-file and
mark motions. <C-O> <C-I> g; g, <C-^> '[mark] `[mark]
** Limitations
- The view information is not saved in shada.
- Calls to get_mark should copy the value in the pointer since we are
using pos_to_mark() to wrap and provide a homogeneous interfaces. This
was also a limitation in the previous state of things.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Ref: https://github.com/vim/vim/commit/84f546363068e4ddfe14a8a2a2322bb8d3a25417
Rename:
- `underlineline` to `underdouble`
- `underdot` to `underdotted`
- `underdash` to `underdashed`
`underdouble` also now takes higher precedence than `undercurl`.
|
| |
| |
| |
| |
| |
| | |
Also fixes a memory leak in `parse_cmdline`.
Closes #18954.
|
| |
| |
| | |
Work on https://github.com/neovim/neovim/issues/459
|
| |
| |
| |
| |
| | |
Free regprog if command isn't previewable
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
| |
| |
| |
| |
| |
| | |
Omitting 'pattern' in nvim_exec_autocmds should be equivalent to
omitting the 'fname' argument in :doautoall, which is equivalent to
using an empty string as the pattern. Fixes regression introduced
in #19091.
|
| | |
|
| | |
|
| |\
| | |
| | | |
fix(api): nvim_set_option_value for global-local options
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
global-local window options need to be handled specially. When `win` is
given but `scope` is not, then we want to set the local version of the
option but not the global one, therefore we need to force
`scope='local'`.
Note this does not apply to window-local only options (e.g. 'number')
Example:
nvim_set_option_value('scrolloff', 10, {}) -- global-local window option; set global value
nvim_set_option_value('scrolloff', 20, {win=0}) -- global-local window option; set local value
nvim_set_option_value('number', true, {}) -- local window option
is now equivalent to:
nvim_set_option_value('scrolloff', 10, {})
nvim_set_option_value('scrolloff', 20, {win=0, scope='local'}) -- changed from before
nvim_set_option_value('number', true, {win=0}) -- unchanged from before
Only the global-local option with a `win` provided gets forced to local
scope.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This marks the following Vim patches as ported:
vim-patch:8.1.1785: map functionality mixed with character input
Problem: Map functionality mixed with character input.
Solution: Move the map functionality to a separate file. (Yegappan
Lakshmanan, closes vim/vim#4740) Graduate the +localmap feature.
https://github.com/vim/vim/commit/b66bab381c8ba71fd6e92327d1d34c6f8a65f2a7
vim-patch:8.2.3643: header for source file is outdated
Problem: Header for source file is outdated.
Solution: Make the header more accurate. (closes vim/vim#9186)
https://github.com/vim/vim/commit/a3f83feb63eae5464a620ae793c002eb45f7a838
Also cherry-pick a change for <unique> mappings from patch 8.2.0807.
Rename map_clear_mode() to do_mapclear().
|
| |/ |
|
| |\
| | |
| | | |
perf: get rid of unnecessary allocations in highlight groups
|