| Commit message (Collapse) | Author | Age |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: coverity complains about some changes in v9.1.1243
Solution: remove duplicate code in diff_find_changed() (Yee Cheng Chin)
closes: vim/vim#16988
https://github.com/vim/vim/commit/4f9b1243e3ef60b9efb64a4e789c55be3cdc7a25
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Diff mode's inline highlighting is lackluster. It only
performs a line-by-line comparison, and calculates a single
shortest range within a line that could encompass all the
changes. In lines with multiple changes, or those that span
multiple lines, this approach tends to end up highlighting
much more than necessary.
Solution: Implement new inline highlighting modes by doing per-character
or per-word diff within the diff block, and highlight only the
relevant parts, add "inline:simple" to the defaults (which is
the old behaviour)
This change introduces a new diffopt option "inline:<type>". Setting to
"none" will disable all inline highlighting, "simple" (the default) will
use the old behavior, "char" / "word" will perform a character/word-wise
diff of the texts within each diff block and only highlight the
differences.
The new char/word inline diff only use the internal xdiff, and will
respect diff options such as algorithm choice, icase, and misc iwhite
options. indent-heuristics is always on to perform better sliding.
For character highlight, a post-process of the diff results is first
applied before we show the highlight. This is because a naive diff will
create a result with a lot of small diff chunks and gaps, due to the
repetitive nature of individual characters. The post-process is a
heuristic-based refinement that attempts to merge adjacent diff blocks
if they are separated by a short gap (1-3 characters), and can be
further tuned in the future for better results. This process results in
more characters than necessary being highlighted but overall less visual
noise.
For word highlight, always use first buffer's iskeyword definition.
Otherwise if each buffer has different iskeyword settings we would not
be able to group words properly.
The char/word diffing is always per-diff block, not per line, meaning
that changes that span multiple lines will show up correctly.
Added/removed newlines are not shown by default, but if the user has
'list' set (with "eol" listchar defined), the eol character will be be
highlighted correctly for the specific newline characters.
Also, add a new "DiffTextAdd" highlight group linked to "DiffText" by
default. It allows color schemes to use different colors for texts that
have been added within a line versus modified.
This doesn't interact with linematch perfectly currently. The linematch
feature splits up diff blocks into multiple smaller blocks for better
visual matching, which makes inline highlight less useful especially for
multi-line change (e.g. a line is broken into two lines). This could be
addressed in the future.
As a side change, this also removes the bounds checking introduced to
diff_read() as they were added to mask existing logic bugs that were
properly fixed in vim/vim#16768.
closes: vim/vim#16881
https://github.com/vim/vim/commit/9943d4790e42721a6777da9e12637aa595ba4965
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
key_name_entry (#33102)
Problem: fragile setup to get (preferred) keys from key_name_entry
(after v9.1.1179)
Solution: refactor the code further, fix a bug with "pref_name" key
entry introduced in v9.1.1180 (Yee Cheng Chin)
The optimization introduced for using bsearch() with key_name_entry
in vim/vim#16788 was fragile as it required synchronizing a non-obvious index
(e.g. IDX_KEYNAME_SWU) with the array that could be accidentally changed
by any one adding a key to it. Furthermore, the "pref_name" that was
introduced in that change was unnecessary, and in fact introduced a bug,
as we don't always want to use the canonical name.
The bug is triggered when the user triggers auto-complete using a
keycode, such as `:set <Scroll<Tab>`. The bug would end up showing two
copies of `<ScrollWheelUp>` because both entries end up using the
canonical name.
In this change, remove `pref_name`, and simply use a boolean to track
whether an entry is an alt name or not and modify logic to respect that.
Add test to make sure auto-complete works with alt names
closes: vim/vim#16987
https://github.com/vim/vim/commit/7d8e7df55190e8e4e5a66f443e4440b52edf2fdb
In Nvim there is no `enabled` field, so put `is_alt` before `name` to
reduce the size of the struct.
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
|
| | |
|
| |
| |
| |
| | |
They were moved in Vim in patch 8.1.1989.
This change is required to port patch 9.1.1243.
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: cannot :put while keeping indent (Peter Aronoff)
Solution: add the :iput ex command (64-bitman)
fixes: vim/vim#16225
closes: vim/vim#16886
https://github.com/vim/vim/commit/e08f10a55c3f15b0b4af631908551d88ec4fe502
Cherry-pick test_put.vim changes from patch 8.2.1593.
N/A patches:
vim-patch:9.1.1213: cannot :put while keeping indent
vim-patch:9.1.1215: Patch 9.1.1213 has some issues
Co-authored-by: 64-bitman <60551350+64-bitman@users.noreply.github.com>
Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Strange error with type for matchfuzzy() "camelcase".
Solution: Show the error "Invalid value for argument camelcase" instead
of "Invalid argument: camelcase" (zeertzjq).
Note that using tv_get_string() will lead to confusion, as when the
value cannot be converted to a string tv_get_string() will also give an
error about that, but "camelcase" takes a boolean, not a string. Also
don't use tv_get_string() for the "limit" argument above.
closes: vim/vim#16926
https://github.com/vim/vim/commit/c4815c157b27923001e44bfd241fb540bf1fb518
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: When searching for "Cur", CamelCase matches like "lCursor" score
higher than exact prefix matches like Cursor, which is
counter-intuitive (Maxim Kim).
Solution: Add a 'camelcase' option to matchfuzzy() that lets users disable
CamelCase bonuses when needed, making prefix matches rank higher.
(glepnir)
fixes: vim/vim#16504
closes: vim/vim#16797
https://github.com/vim/vim/commit/28e40a7b55ce471656cccc2260c11a29d5da447e
Co-authored-by: glepnir <glephunter@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: The current_pos.col was incorrectly updated to the length of
the matching text. This will cause the next search to start
from the wrong position.
Solution: current_pos has already been updated in search_str_in_line and
does not need to be changed (glepnir)
closes: vim/vim#16941
https://github.com/vim/vim/commit/5753084042e17d794627d77e4300def031ce5498
Co-authored-by: glepnir <glephunter@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: 'completefuzzycollect' does not handle dictionary correctly
Solution: check for ctrl_x_mode_dictionary (glepnir)
closes: vim/vim#16867
https://github.com/vim/vim/commit/587601671cd06ddc4d78f907d98578cdab96003f
Cherry-pick a documentation fix from later.
Co-authored-by: glepnir <glephunter@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
- Fix grammar
- Use "matches" instead of "items" ("completion candidates" is used in
some other places, but it's a bit verbose)
- "When set" is a bit vague, instead use "For specified modes"
closes: vim/vim#16871
https://github.com/vim/vim/commit/1dc731a49ff5d06ead4b506afa04288a5baafc1a
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: process_next_cpt_value() uses wrong condition
Solution: use cfc_has_mode() instead and remove redundant else if branch
(glepnir)
closes: vim/vim#16833
https://github.com/vim/vim/commit/53b14578e03f93a53fd6eb21c00caf96484742ed
Co-authored-by: glepnir <glephunter@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: endless loop with completefuzzycollect and no match found
Solution: move pointer to line end and break loop
closes: vim/vim#16820
https://github.com/vim/vim/commit/dd42b05f8a37df03a9b77a16a47c08ab33af2b1f
Co-authored-by: glepnir <glephunter@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: No cmdline completion for the 'completefuzzycollect' option
(after v9.1.1178)
Solution: Add cmdline completion for the 'completefuzzycollect' option,
improve its description in optwin.vim (zeertzjq).
closes: vim/vim#16813
https://github.com/vim/vim/commit/53d59ecc1d93ce3a3f6d0182479d825852018ceb
No code change is needed in Nvim as Nvim uses expand_set_str_generic()
by default.
|
|
|
|
|
|
|
|
|
| |
Problem: Unnecessary STRLEN() calls in insexpand.c (after 9.1.1178).
Solution: Use the already available length (zeertzjq).
closes: vim/vim#16814
https://github.com/vim/vim/commit/4422de6316b544c282e6c74afd3df3ee3a4b1cfd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fuzzy matching
Problem: not possible to generate completion candidates using fuzzy
matching
Solution: add the 'completefuzzycollect' option for (some) ins-completion
modes (glepnir)
fixes vim/vim#15296
fixes vim/vim#15295
fixes vim/vim#15294
closes: vim/vim#16032
https://github.com/vim/vim/commit/f31cfa29bf72b0cdf6fa1b60346ea4e187bcafd1
Co-authored-by: glepnir <glephunter@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: potential out-of-memory issue in search.c
Solution: improve situation and refactor search.c slightly
(John Marriott)
- In function update_search_stat():
add a check for a theoretical null pointer reference, set and remember
the length of lastpat, remove the three calls to STRLEN() and use the
various string's associated lengths instead, add a check for an
out-of-memory condition.
- In function search_for_fuzz_match():
remove a call to strnsave() and thus avoid having to add a check for
an out-of-memory condition, also replace the call to STRLEN() by
ml_get_buf_len().
closes: vim/vim#16689
https://github.com/vim/vim/commit/b79fa3d9c8a08f15267797511d779e33bd33e68e
Co-authored-by: John Marriott <basilisk@internode.on.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: keyword completion does not work with fuzzy
(egesip)
Solution: handle ctrl_x_mode_normal() specifically
(glepnir)
fixes: vim/vim#15412
closes: vim/vim#15424
https://github.com/vim/vim/commit/7cfe693f9bfa74690867e4d96c25f2205d0d13e4
Co-authored-by: glepnir <glephunter@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fuzzy documentation
Originally, `:set completeopt+=fuzzy` did not affect how the candidate
list is collected in default keyword completion. A comment was added to
documentation as part of vim/vim#14912 to clarify it. vim/vim#15193 later changed the
fuzzy behavior to now change the candidate collection behavior as well
so the clarification in docs is now wrong. Remove them here.
closes: vim/vim#15656
https://github.com/vim/vim/commit/26e4b000025ea0e25ea7877314d9095737431bae
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Problem: Sorting of fuzzy filename completion is not stable
Solution: Compare indexes when scores are equal. Fix some typos.
(zeertzjq)
closes: vim/vim#15593
https://github.com/vim/vim/commit/58d705238c0794ee3baa4173831ab157e709a48a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: completion does not respect completeslash with fuzzy
(egesip)
Solution: Change path separator on Windows, depending on 'completeslash'
option value (glepnir)
fixes: vim/vim#15392
closes: vim/vim#15418
https://github.com/vim/vim/commit/b9de1a057f9a0b6de6f64a9c1b2078c7069cdd7d
Co-authored-by: glepnir <glephunter@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Ctrl-P not working by default
(Jesse Pavel, after v9.1.0598)
Solution: Revert part of v9.1.0598 and set cur_match_pos
correctly according to compl_dir_forward()
fixes: vim/vim#15370
closes: vim/vim#15379
https://github.com/vim/vim/commit/13032a49b7d2a45e7c774cf23ee8f58f56b03781
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fuzzy completion
Problem: wrong completion list displayed with non-existing dir + fuzzy
completion (kawarimidoll)
Solution: clear list of matches, if leader did not use fuzzy match
(glepnir)
fixes: vim/vim#15357
closes: vim/vim#15365
https://github.com/vim/vim/commit/6b6280c4a270547f84f01c0e0d9be1b7d6bb9e20
Co-authored-by: glepnir <glephunter@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: internal error with fuzzy completion
(techntools)
Solution: only fuzzy complete the pattern after directory separator
(glepnir)
fixes: vim/vim#15287
closes: vim/vim#15291
https://github.com/vim/vim/commit/0be03e14b9a2899f5e96720e3b21935bd9d2d34e
Co-authored-by: glepnir <glephunter@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: fuzzy completion does not work with default completion
Solution: Make it work (glepnir)
closes: vim/vim#15193
https://github.com/vim/vim/commit/8159fb18a92e9a9f5e35201bd92bf651f4d5835c
Cherry-pick insexpand.c changes from patch 9.1.0608.
N/A patch:
vim-patch:9.1.0632: MS-Windows: Compiler Warnings
Co-authored-by: glepnir <glephunter@gmail.com>
|
|
|
|
| |
This reverts commit 466f20dd7039e1602c9382f76ac6471d9feb49b7.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: With ':set splitkeep=screen', cursor did't restore column
correctly when splitting a window on a line longer than the
last line on the screen (after v9.1.0707)
Solution: Restore cursor column in `win_fix_scroll()` since it may be
changed in `getvcol()` after 396fd1ec2956 (phanium).
Example:
```
echo longlonglongling\nshort | vim - -u NONE --cmd 'set
splitkeep=screen' +'norm $' +new +q
```
fixes: vim/vim#16968
closes: vim/vim#16971
https://github.com/vim/vim/commit/7746348c5d0f4c4707503f856d0335d8921e8d50
Co-authored-by: phanium <91544758+phanen@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
| |
Problem:
On Windows, since b360c0608556, UI may hang on exit. #33019
Solution:
Restore the hack in on_proc_exit, until we can figure out why rpc_close
is not called in the UI client when the server closes the channel.
|
|
|
|
|
|
|
|
|
|
| |
Problem:
chan_close_on_err() writes to the log file before peforming its actual
work. This could be slightly misleading in terms of log timestamps, or
could delay important work on Windows where file-open/write can be slow.
Solution:
Log after closing the channel, instead of before.
|
|
|
|
|
|
|
|
|
|
| |
Problem:
`receive_msgpack()` calls `channel_close()` just before calling
`chan_close_on_err()`, even though `chan_close_on_err()` always calls
`channel_close()`.
Solution:
Remove the redunant `channel_close()` in `receive_msgpack()`.
|
|
|
|
|
|
|
| |
Problem: Error messages that cause a vim.ui_attach() namespace to
detach are not visible in the message history. Decoration
provider and vim.ui_attach error messages are dissimilar.
Solution: Emit vim.ui_attach() errors as an actual message in addition
to logging it. Adjust error message format.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: "shellcmdline" completion doesn't work with input().
Solution: Use set_context_for_wildcard_arg(). Fix indent in nextwild()
(zeertzjq).
There are some other inconsistencies for input() completion (ref vim/vim#948),
but since "shellcmdline" currently doesn't work at all, it makse sense
to at least make it work.
fixes: vim/vim#16932
closes: vim/vim#16934
https://github.com/vim/vim/commit/7a5115ce50c622caf91503f9d7fe09c3749b928b
|
|
|
|
|
|
|
|
|
| |
Problem: Message kind logic for emitting an error message is convoluted
and still results in emitting an unfinished message earlier than
wanted.
Solution: Ensure emsg_multiline() always sets the kind wanted by the caller
and doesn't isn't unset to logic for emitting the source message.
Caller is responsible for making sure multiple message chunks are
not emitted as multiple events by setting `msg_ext_skip_flush`...
|
|
|
|
|
| |
Problem: Crash with nvim_get_runtime_file during wildcard expansion.
Solution: Ensure recursive gen_expand_wildcards() is allowed when
calling os_breakcheck()
|
|
|
|
|
|
| |
Problem: Reconfiguring a float window applies the global 'winborder'.
Solution:
- Ignore 'winborder' when reconfiguring a float window.
- Still apply 'winborder' when converting a split to a float window.
|
|
|
|
|
|
|
| |
Problem: Paired mark whose end is in front of its start should not have
its decor removed (as fixed by 72f630f9), but may still need to
have its range redrawn.
Solution: Still call `buf_decor_remove()` but ensure it is not called with
an inverse range when `extmark_del()` is called on an end mark.
|
|
|
|
|
|
| |
While at it, rename the p_winbd variable to p_winborder, as 'winbd' is
not the option's short name.
Co-authored-by: glepnir <glephunter@gmail.com>
|
|
|
|
|
|
| |
Problem: 'winborder' accepting multiple string values.
Solution: Use the fallback did_set_str_generic() callback instead of
did_set_winborder() which calls opt_strings_flags() with
incorrect last argument.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'autoindent' (#32976)
Problem: Wrong cursor position and '^' mark when leaving Insert mode
just after 'autoindent' and cursor on last char of line.
Solution: Don't move cursor to NUL when it wasn't moved to the left
(zeertzjq).
fixes: vim/vim#15581
related: neovim/neovim#30165 neovim/neovim#32943
closes: vim/vim#16922
https://github.com/vim/vim/commit/a3a7d10bfb9547991e04bcf12d1391deb8060754
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: using wrong length for last inserted string
(Christ van Willegen, after v9.1.1212)
Solution: use the correct length in get_last_insert_save(), make
get_last_insert() return a string_T (John Marriott)
closes: vim/vim#16921
https://github.com/vim/vim/commit/8ac0f73eb1e0e6128dd21eb294d12b83b615f05a
N/A patches:
vim-patch:9.1.1129: missing out-of-memory test in buf_write()
vim-patch:9.1.1218: missing out-of-memory check in filepath.c
Co-authored-by: John Marriott <basilisk@internode.on.net>
|
|
|
|
|
|
|
|
|
| |
Problem:
There is currently no global option to define the default border style for floating windows. This leads to repetitive code when developers need consistent styling across multiple floating windows.
Solution:
Introduce a global option winborder to specify the default border style for floating windows. When a floating window is created without explicitly specifying a border style, the value of the winborder option will be used. This simplifies configuration and ensures consistency in floating window appearance.
Co-authored-by: Gregory Anders <greg@gpanders.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Pasting the '.' register multiple times may work incorrectly
when the last insert starts with Ctrl-D and ends with '0'.
(after 9.1.1212)
Solution: Restore the missing assignment (zeertzjq).
closes: vim/vim#16908
https://github.com/vim/vim/commit/61b354442418539056cc7073a9aec353d297836c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: too many strlen() calls in edit.c
Solution: refactor edit.c and remove strlen() calls
(John Marriott)
This commit attempts to make edit.c more efficient by:
- in truncate_spaces() pass in the length of the string.
- return a string_T from get_last_insert(), so that the length of the
string is available to the caller.
- refactor stuff_insert():
- replace calls to stuffReadbuff() (which calls STRLEN() on it's
string argument) with stuffReadbuffLen() (which gets the length of
it's string argument passed in).
- replace call to vim_strrchr() which searches from the start of the
string with a loop which searches from end of the string to find the
last ESC character.
- change get_last_insert_save() to call get_last_insert() to get the
last_insert string (the logic is in one place).
closes: vim/vim#16863
https://github.com/vim/vim/commit/34954972c27244a4a1fb4eeeae2aa4e021efd100
Co-authored-by: John Marriott <basilisk@internode.on.net>
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Since 3cb1e825, all windows with 'statuscolumn' set, and a
resized 'signcolumn' for a particular buffer are marked
to be fully redrawn when the first window is encountered.
The "resized" variable is only unset after all windows have
been drawn, so this results in windows that have just been
draw to be marked for redraw again, even though the
signcolumn did not change size again.
Solution: Replace the `resized` variable with a `last_max` variable that
is changed when the first window into buf is encountered.
|
| |
|
| |
|