| 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
|
| |
| |
| | |
Replace grid.h in screen.h and screen.h in buffer.h with grid_defs.h
|
| |
| |
| | |
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
| |
| |
| |
| |
| |
| | |
Problem: Mode is not cleared when leaving Insert mode.
Solution: Clear the mode when got_int is set. (Ozaki Kiichi, closes vim/vim#4270)
https://github.com/vim/vim/commit/abc7c7fc5a098374f5543a237e6c9dd918848b34
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Peeking and flushing output slows down execution.
Solution: Do not update the mode message when global_busy is set. Do not
flush when only peeking for a character. (Ken Takata)
https://github.com/vim/vim/commit/cb574f415486adff645ce384979bfecf27f5be8c
Omit inchar() change: it breaks too many tests.
N/A patches for version.c:
vim-patch:8.2.5170: tiny issues
Problem: Tiny issues.
Solution: Tiny improvements.
https://github.com/vim/vim/commit/944cc9ceba8868acd238264d4a3894803c566b37
|
| |
| |
| |
| | |
Work on https://github.com/neovim/neovim/issues/459
|
|/
|
|
|
|
|
|
|
|
|
| |
* The userreg function can now return a list. If a list is returned, the
yankreg will be set to kMTLineWise, and each element in the list will
become a line in the yankreg.
* Use tv_get_string to get strings from typevals.
* call tv_free on the tv sent to typval_to_yankreg to properly unref the
values.
|
|
|
|
| |
this works similar to <c-o> or <c-\><c-o> in insert mode
|
|
|
|
|
|
| |
Problem: Code has more indent than needed.
Solution: Use continue and return statements. (closes vim/vim#10824)
https://github.com/vim/vim/commit/101d57b34b72f4fbc7df1b6edfd64c64a6be14fc
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
Problem: Can still switch windows for 'completefunc'.
Solution: Also disallow switching windows for other completions.
https://github.com/vim/vim/commit/3eb6bd9c2b36dcce471bfb543c8d5488f1dc17a4
Assert E565 instead of E578.
Need to assert a different string because patch 8.2.1919 hasn't been
ported yet.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Allowing 'completefunc' to switch windows causes trouble.
Solution: use "textwinlock" instead of "textlock".
https://github.com/vim/vim/commit/28976e2accf11591c60e8a658a9e03544f0408b2
Assert E565 instead of E578.
vim-patch:8.2.0670: cannot change window when evaluating 'completefunc'
Problem: Cannot change window when evaluating 'completefunc'.
Solution: Make a difference between not changing text or buffers and also
not changing window.
https://github.com/vim/vim/commit/6adb9ea0a6ca01414f4b591f379b0f829a8273c0
vim-patch:8.2.5029: "textlock" is always zero
Problem: "textlock" is always zero.
Solution: Remove "textlock" and rename "textwinlock" to "textlock".
(closes vim/vim#10489)
https://github.com/vim/vim/commit/cfe456543e840d133399551f8626d985e1fb1958
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#19244)
Problem: Get ml_get error when deleting a line in 'completefunc'. (Yegappan
Lakshmanan)
Solution: Lock the text while evaluating 'completefunc'.
https://github.com/vim/vim/commit/ff06f283e3e4b3ec43012dd3b83f8454c98f6639
Fix a mistake in the porting of patch 8.1.0098.
Cherry-pick Test_run_excmd_with_text_locked() from patch 8.2.0270.
Cherry-pick test_gf.vim changes from patch 8.2.0369.
Cherry-pick message change from later patches.
|
|
|
|
|
|
|
| |
Problem: Now that the +visual feature is always enabled the #ifdefs for it
are not useful.
Solution: Remove the checks for FEAT_VISUAL.
https://github.com/vim/vim/commit/f7ff6e85e8a4e84cff023f5db4b66ef85986605a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add 'mousescroll' option to control how many lines to scroll by when a
mouse wheel keycode is received. The mousescroll option controls both
horizontal and vertical scrolling. The option is a string in the format:
set mousescroll=direction:count,direction:count
Where direction is either "ver" or "hor", and count is a non negative
integer. If a direction is omitted, a default value is used. The default
values remain unchanged, that is 3 for vertical scrolling, and 6 for
horizontal scrolling. As such, the mousescroll default is "ver:3,hor:6".
Add mousescroll documentation
- Add option documentation in options.txt
- Add brief summary in quickref.txt
Update :help scroll-mouse-wheel
- Mention mousescroll option as a means of controlling scrolling.
- Remove obsolete suggestion to map scroll wheel keys to <C-U> to
scroll by a single line -- users should prefer the mousescroll option.
- Add some information about the consequences of remapping scroll wheel
keys (they lose their magic ability to affect inactive windows).
Update :help vim-differences
- Add brief mousescroll summary under Options
Add mousescroll tests
- Test option validation
- Test default mousescroll value and behavior
- Test fallback to default values
- Test mouse vertical and horizontal scrolling in normal mode
- Test mouse vertical and horizontal scrolling in insert mode
|
|
|
|
|
|
|
| |
mode (#19241)
Problem: Reading before the start of the line with BS in Replace mode.
Solution: Check the cursor column is more than zero.
https://github.com/vim/vim/commit/0971c7a4e537ea120a6bb2195960be8d0815e97b
|
|
|
|
|
|
|
|
| |
Problem: When re-formatting with an indent expression the first line of a
paragraph may get the wrong indent. (Martin F. Krafft)
Solution: Apply the correct indenting function for the first line.
(Christian Brabandt, closes vim/vim#9150, closes vim/vim#9056)
https://github.com/vim/vim/commit/818ff25cd1aabf60b9cd239da2f1328a959954f7
|
|
|
|
| |
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.
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
|
|
|
| |
(#19083)
Problem: 'completefunc'/'omnifunc' error does not end completion.
Solution: Check if there was an error or exception. (closes vim/vim#10486,
closes vim/vim#4218)
https://github.com/vim/vim/commit/9bcb9ca9c7dd1632385dc3351b5e019739368658
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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: 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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The size of long varies depending on architecture, in contrast to the
MAXLNUM constant which sets the maximum allowable number of lines to
2^32-1. This discrepancy may lead to hard to detect bugs, for example
https://github.com/neovim/neovim/issues/18454. Setting linenr_T to a
fix maximum size of 2^32-1 will prevent this type of errors in the
future.
Also change the variables `amount` and `amount_after` to be linenr_T
since they're referring to "the line number difference" between two
texts.
|
|
|
| |
related vim-8.2.{4402,4639}
|
| |
|
|
|
|
|
|
|
|
| |
comment (#18717)
Problem: When 'formatoptions' contains "/" wrongly wrapping a long trailing
comment.
Solution: Pass the OPENLINE_FORMAT flag.
https://github.com/vim/vim/commit/7e667788150be617aeac42b0d668618ac33ab9da
|
|
|
|
|
|
|
| |
Neovim already removed `evim` (or any similar flags). The 'insertmode'
option is a weird remnant, so get rid of it.
The 'insertmode' option is replaced with a script that closely emulates
the option. This script is documented at :help 'insertmode'
|
|
|
|
|
|
| |
Problem: smart/C/lisp indenting is optional, which makes the code more
complex, while it only reduces the executable size a bit.
Solution: Graduate FEAT_CINDENT, FEAT_SMARTINDENT and FEAT_LISP.
https://github.com/vim/vim/commit/8e145b82464a21ee4fdf7948f04e2a1d505f8bfa
|
| |
|
|
|
|
|
|
| |
Problem: Changing text in Visual mode may cause invalid memory access.
Solution: Check the Visual position after making a change.
https://github.com/vim/vim/commit/7ce5b2b590256ce53d6af28c1d203fb3bc1d2d97
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
|
| |
Problem: With 'smartindent' inserting '}' after completion goes wrong.
Solution: Check the cursor is in indent. (closes vim/vim#10420)
https://github.com/vim/vim/commit/2e444bbef0f36535bf941f007f2961f3f66bbe87
|
|
|
|
|
|
| |
Problem: Smart indenting done when not enabled.
Solution: Check option values before setting can_si. (closes vim/vim#10420)
https://github.com/vim/vim/commit/de5cf287812510d2c8ffe66b99cf33c4e1a6e6f1
|
|\
| |
| | |
refactor: replace char_u variables and functions with char
|
| |
| |
| |
| | |
Work on https://github.com/neovim/neovim/issues/459
|
|/
|
|
|
|
|
|
| |
Most code in keymap.h is for keycode definitions, while most code in
keymap.c is for the parsing and conversion of keycodes.
The name "keymap" may also make people think these two files are for
mappings, while in fact keycodes are used even when no mappings are
involved, so "keycodes" should be a better file name than "keymap".
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Problem: No text formatting for // comment after a statement.
Solution: format a comment when the 'c' flag is in 'formatoptions'.
https://github.com/vim/vim/commit/48a8a833033e10fc1eba96f2fc8dd19c2408eddf
|
|\
| |
| | |
refactor: replace char_u variables and functions with char
|
| |
| |
| |
| | |
Work on https://github.com/neovim/neovim/issues/459
|
|/ |
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/567
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
|
| |
Problem: :startinsert right after :stopinsert does not work when popup menu
is still visible.
Solution: Use ins_compl_active() instead of pum_visible(). (closes vim/vim#10352)
https://github.com/vim/vim/commit/cd5dbad184e8235beb13dcd8a22302da09db9766
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|