| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
|
|
|
| |
name (#19944)
Problem: bufload() reads a file even if the name is not a file name. (Cyker
Way)
Solution: Do not read the file when the buffer name is not a file name.
(closes vim/vim#10975)
https://github.com/vim/vim/commit/2eddbacd6dc17c84e4bdc41e60e81949a36bb973
|
|
|
|
|
| |
Problem: Redraw flags are not named specifically.
Solution: Prefix "UPD_" to the flags, for UPDate_screen().
https://github.com/vim/vim/commit/a4d158b3c839e96ed98ff87c7b7124ff4518c4ff
|
|
|
|
|
| |
Problem: Error from setting an option is silently ignored.
Solution: Handle option value errors better. Fix uses of N_().
https://github.com/vim/vim/commit/31e5c60a682840959cae6273ccadd9aae48c928d
|
|
|
|
|
| |
Problem: Command line expansion code is spread out.
Solution: Move the code to cmdexpand.c. (Yegappan Lakshmanan, closes vim/vim#4831)
https://github.com/vim/vim/commit/66b51420e0c8d49bcf6786b792c938d6099e3393
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: The option.c file is too big.
Solution: Split off the code dealing with strings. (Yegappan Lakshmanan,
closes vim/vim#4937)
https://github.com/vim/vim/commit/dac1347b4d9c1a1aef6aa73fdea08a9d1077d6ea
Cherry-pick set_string_option_direct_in_win() from patch 8.1.1405.
Cherry-pick shift_line() comment change from patch 8.1.2096.
Move 'clipboard' default parsing to didset_string_options().
Reorder option flags to put Nvim-only flags at the end.
|
|
|
|
|
|
|
|
|
| |
problem: code for drawing statusline is arbitrarily spreadout between drawscreen.c, screen.c and buffer.c
solution: move it to a new file statusline.c
- rename archaic internal name "status match" to public name "wildmenu"
- showruler() does not show the ruler. it show anything which displays
info about the cursor. Rename it accordingy.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Problem: src/ex_cmds.c file is too big.
Solution: Move help related code to src/help.c. (Yegappan Lakshmanan,
closes vim/vim#6506)
https://github.com/vim/vim/commit/f868ba89039045b25efe83d12ca501d657e170e8
|
|
|
|
|
|
| |
Problem: Code for the argument list is spread out.
Solution: Put argument list code in arglist.c. (Yegappan Lakshmanan,
closes vim/vim#4819)
https://github.com/vim/vim/commit/4ad62155a1015751a6645aaecd94b02c94c8934b
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Execution stack is incomplete and inefficient.
Solution: Introduce a proper execution stack and use it instead of
sourcing_name/sourcing_lnum. Create a string only when used.
https://github.com/vim/vim/commit/1a47ae32cdc19b0fd5a82e19fe5fddf45db1a506
Omit test_debugger.vim: superseded by later patches.
Omit check_map_keycodes(): N/A.
Omit kword_test.c: N/A (converted to a unit test).
|
|
|
|
|
| |
Problem: ml_get error when switching buffer in Visual mode.
Solution: End Visual mode when switching buffer. (closes vim/vim#10902)
https://github.com/vim/vim/commit/cfeb8a584be11758cf71ae02f6c937b06d6bb66f
|
| |
|
|
|
|
|
| |
- Remove autocmd.h from fileio.h
- Remove normal.h from main.h
- Move bufinfo_T from undo_defs.h to undo.c
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
Problem: Ex command error cannot contain an argument.
Solution: Add ex_errmsg() and translate earlier. Use e_trailing_arg where
possible.
https://github.com/vim/vim/commit/8930caaa1a283092aca81fdbc3fcf15c7eadb197
Remove duplicate test file 062_tab_pages_spec.lua
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
Problem: Buffer menu does not handle special buffers properly.
Solution: Keep a dictionary with buffer names to reliably keep track of
entries.
Also trigger BufFilePre and BufFilePost for command-line and
terminal buffers when the name changes.
https://github.com/vim/vim/commit/5e94a29ebbde10dd973d58f1adba9a2fc83877d1
|
|
|
|
|
| |
The "cp" stands for codepoint.
Closes https://github.com/neovim/neovim/issues/7401
|
|
|
|
|
|
| |
Problem: Conditions are always true.
Solution: Remove useless conditions. (closes vim/vim#10802)
https://github.com/vim/vim/commit/122dea70073d140aa89212d344c3f62bd3b5b3fa
|
|
|
|
|
|
|
|
|
|
| |
Problem: The changelist index is not remembered per buffer.
Solution: Keep the changelist index per window and buffer. (closes vim/vim#10135,
closes vim/vim#2173)
https://github.com/vim/vim/commit/db0ea7f2b00c84d84f188c9e9953c4f1887528e7
Cherry-pick FOR_ALL_BUF_WININFO from patch 8.2.0500.
Cherry-pick test_changelist.vim change from patch 8.2.3795.
|
|
|
|
|
|
|
|
| |
Problem: The eval.c file is too big.
Solution: Move code related to variables to evalvars.c. (Yegappan
Lakshmanan, closes vim/vim#4868)
https://github.com/vim/vim/commit/0522ba0359c96a8c2a4fc8fca0d3b58e49dda759
Name the new file eval/vars.c instead.
|
|
|
|
|
|
| |
Problem: Functionality of bt_nofile() is confusing.
Solution: Split into bt_nofile() and bt_nofilename().
https://github.com/vim/vim/commit/26910de8b0da6abab87bd5a397330f9cbe483309
|
|
|
|
|
|
|
|
| |
Problem: Some errors were not tested for.
Solution: Add tests. (Dominique Pelle, closes vim/vim#5824)
https://github.com/vim/vim/commit/9b9be007e7d674f49fc2b650f840d08532b180ad
Cherry-pick get_highest_fnum() from patch 8.1.1908 to make tests pass.
|
|
|
|
|
|
|
| |
Problem: FEAT_WINDOWS adds a lot of #ifdefs while it is nearly always
enabled and only adds 7% to the binary size of the tiny build.
Solution: Graduate FEAT_WINDOWS.
https://github.com/vim/vim/commit/4033c55eca575777718c0701e26635a0cc47d907
|
|
|
|
|
| |
Problem: Saving and restoring called_emsg is clumsy.
Solution: Count the number of error messages.
https://github.com/vim/vim/commit/53989554a44caca0964376d60297f08ec257c53c
|
|
|
|
|
|
|
| |
Problem: Can open a cmdline window from a substitute expression.
Solution: Disallow opening a command line window when text or buffer is
locked.
https://github.com/vim/vim/commit/71223e2db87c2bf3b09aecb46266b56cda26191d
|
|
|
|
|
|
|
|
| |
- Partially fixes #10386 except for the case where the alternate buffer
is the default, empty, first buffer created on startup. #vimlife
- TODO: port patches related to `can_unload_buffer`, maybe that fully
fixes #10386?
vim-patch:8.0.1732: crash when terminal API call deletes the buffer
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
** 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.
|
|
|
|
|
| |
Problem: Map functionality outside of map.c.
Solution: Move f_hasmapto() to map.c. Rename a function. (closes vim/vim#10611)
https://github.com/vim/vim/commit/c207fd2535717030d78f9b92839e5f2ac004cc78
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
Coverity reports use after free:
*** CID 352784: Memory - illegal accesses (USE_AFTER_FREE)
/src/nvim/buffer.c: 1508 in set_curbuf()
1502 if (old_tw != curbuf->b_p_tw) {
1503 check_colorcolumn(curwin);
1504 }
1505 }
1506
1507 if (bufref_valid(&prevbufref) && prevbuf->terminal != NULL) {
>>> CID 352784: Memory - illegal accesses (USE_AFTER_FREE)
>>> Calling "terminal_check_size" dereferences freed pointer "prevbuf->terminal".
1508 terminal_check_size(prevbuf->terminal);
1509 }
1510 }
1511
1512 /// Enter a new current buffer.
1513 /// Old curbuf must have been abandoned already! This also means "curbuf" may
Solution:
Change terminal_destroy and terminal_close to set caller storage to NULL,
similar to XFREE_CLEAR. This aligns with the pattern found already in:
terminal_destroy e897ccad3eb1e
term_delayed_free 3e59c1e20d605
|
|
|
|
|
|
| |
Problem: Command modifier parsing always uses global cmdmod.
Solution: Pass in cmdmod_T to use. Rename struct fields consistently.
https://github.com/vim/vim/commit/e10044015841711b989f9a898d427bcc1fdb4c32
|
|
|
|
|
|
|
|
| |
There can be other places that access window buffer info (e.g.
`tabpagebuflist()`), so checking `w_closing` in `win_findbuf()` doesn't
solve the crash in all cases, and may also cause Nvim's behavior to
diverge from Vim.
Fix #14998
|
| |
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|\
| |
| | |
refactor: replace char_u variables and functions with char
|
| |
| |
| |
| | |
Work on https://github.com/neovim/neovim/issues/459
|
| |
| |
| |
| |
| |
| | |
Problem: Crash when matching buffer with invalid pattern.
Solution: Check for NULL regprog.
https://github.com/vim/vim/commit/a59f2dfd0cf9ee1a584d3de5b7c2d47648e79060
|
|/
|
|
|
|
| |
Problem: NULL pointer access when using invalid pattern.
Solution: Check for failed regexp program.
https://github.com/vim/vim/commit/8e4b76da1d7e987d43ca960dfbc372d1c617466f
|
|
|
|
|
|
| |
Problem: Off-by-one error in in statusline item.
Solution: Subtrace one less. (closes vim/vim#10394, closes vim/vim#5599)
https://github.com/vim/vim/commit/57ff52677bf5ba1651281ffe40505df8feba4a36
|
|
|
|
|
|
|
|
| |
Problem: The mode #defines are not clearly named.
Solution: Prepend MODE_. Renumber them to put the mapped modes first.
https://github.com/vim/vim/commit/249591057b4840785c50e41dd850efb8a8faf435
A hunk from the patch depends on patch 8.2.4861, which hasn't been
ported yet, but that should be easy to notice.
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|\
| |
| | |
refactor: replace char_u variables and functions with char
|
| |
| |
| |
| | |
Work on https://github.com/neovim/neovim/issues/459
|
|/
|
|
|
|
|
|
| |
This warning is essentially only triggered for ported vim functions.
It's unlikely that we'll refactor vim functions solely based on their
size since it'd mean we'd greatly deviate from vim, which is a high cost
when it comes to importing the vim patches. Thus, this warning only
serves as an annoyance and should be removed.
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|