Problem: completion list wrong after v9.1.0891
Solution: update compl_mach_array after leader change
(glepnir)
compl_shown_match update not correct after refactoring in v9.1.0891
Unfortunately, this regressed what item is selected after leader change.
So generate compl_match_array before updating compl_shown_match range,
and split generate compl_match_array into range match_head
fixes: #16128closes: #16129
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: default history value is too small
Solution: promote the change from defaults.vim back to
the C core, so increase the default 'history' option value
from 50 to 200 (Lucca Saccarola)
closes: #16129
Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: No test for what the spotbug compiler parses
(after commit: 65311c6f47)
Solution: Test &makeprg for the SpotBugs compiler plugin
(Aliaksei Budavei)
closes: #16096
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: No test that undofile format does not regress
Solution: include a sample undofile to make sure we are always able to
read it
This is so, that we don't unintentionally change the undofile format and
make sure we can load an undo file that has been created by an older
Vim.
closes: #16127
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: the max value of 'tabheight' is limited by other tabpages
Solution: Limit the maximum value of 'cmdheight' to the current tabpage only.
(Milly)
The Help says that cmdheight is local to the tab page, but says nothing
about the maximum value depending on the state of all tab pages. Users
may wonder why they can't increase cmdheight when there are still rows
available on the current tab page. This PR changes the behavior of
cmdheight so that its maximum value depends only on the state of the
current tab page.
Also, since magic numbers were embedded in various places with the
minimum value of cmdheight being 1, we defined a constant to make it
easier to understand.
closes: #16131
Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: building the completion list array is inefficient
Solution: refactor and improve ins_compl_build_pum() func
(glepnir)
current time complexity is O(n^2). I guess garray is not used here to save memory and avoid efficiency
is caused by heap memory allocation. A simple way is to add an extra pointer as a single linked list
to store the matching compl_T, and traverse this single linked list to generate compl_match_array.
The time complexity is O(n x m). The worst case is m=n, but we can still get a little improvement.
Because the if condition does not need to be run at one time. This should be a good solution for now.
Later we may be able to complete it in O(lgn) time. But this requires more reconstruction. So this is
the first step.
closes: #16125
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: %! item not allowed for 'rulerformat'
(yatinlala)
Solution: also allow to use %! for rulerformat option
(Yegappan Lakshmanan)
fixes: #16091closes: #16118
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Possible unnecessary redraw after adding/deleting lines.
Solution: Check b_mod_set before using b_mod_xlines to avoid using stale
b_mod_xlines value (zeertzjq).
closes: #16124
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: style of sign.c can be improved
Solution: Refactor code (Luca Saccarola)
Purpose of this commit is:
- separate clearly sections of code
- declare variables at the lowest scope possible
- initialize all variables
closes: #16092
Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: gcc warns about uninitialized variable in vim_strnicmp_asc()
Solution: initialize variable to 1
(John Marriott)
closes: #16108
Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
the translated man page is synchronized with the original English
closes: #16113
Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: too many strlen() calls in insexpand.c
Solution: Refactor insexpand.c and reduce number of calls to STRLEN(),
fix a warning get_next_filename_completion(), add new function
ins_compl_leader_len() (John Marriott)
closes: #16095
Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: GUI: message dialog may not get focus
Solution: add window manager hint to give focus to the dialog
(Chris White)
Tell the window manager that message dialogs should be given focus when
the user switches from another application back to Vim. This can
happen, e.g., when the user has a file open in Vim and then edits it
in another program.
fixes: #172closes: #16100
Signed-off-by: Chris White <christopher.white@crowdstrike.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Detect a few more default archive types, correctly handle file
extensions with digits in it.
fixes: #16099closes: #16104
Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This is used in preparation to enable automatic code-formatting in the
following commits. For now let's just add a clang-format config file,
formatting of source files will follow.
related: #16019
Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
See newly added help entry referring to option-backslash
closes: #16084
Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: filetype: openCL files are not recognized
Solution: detect '*.cl' files as opencl or lisp filetype,
include a opencl syntax and filetype plugin (Wu, Zhenyu)
closes: #15825
Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: filetype: karel files are not detected
Solution: detect '*.kl' files as karel filetype,
include syntax and filetype plugin
(Kirill Morozov)
closes: #16075
Co-authored-by: KnoP-01 <knosowski@graeffrobotics.de>
Signed-off-by: Kirill Morozov <kirill@robotix.pro>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: No test for W23 message
Solution: Check for W23 message when accessing the clipboard fails
(after v9.1.0868)
closes: #16076
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: getcellpixels() can be further improved
Solution: Fix floating point exception, implement getcellpixels() in the
UI (mikoto2000)
closes: #16059
Signed-off-by: mikoto2000 <mikoto2000@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: too many strlen() calls in eval.c
Solution: Refactor eval.c to remove calls to STRLEN()
(John Marriott)
closes: #16066
Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: curswant not set on gm in folded line
(citizenmatt)
Solution: in a folded line, call update_curswant_force()
fixes: #11596closes: #11994closes: #15398
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: the warning about missing clipboard can be improved
(after v9.1.0852)
Solution: use different warnings depending on whether or not clipboard
support is included in Vim, update related documentation
Improve the Warnings about missing clipboard registers
- Make it translatable
- Use a different warning, when clipboard support was not compiled in
- add a reference to :h W24
- explain in more detail the error message
closes: #16069
Signed-off-by: Christian Brabandt <cb@256bit.org>
Also remove (automatically generated) tags-* (made by make vimtags) and
vim-stylesheet.css (which is produced by vim2html.pl).
related: #16061
Signed-off-by: Christian Brabandt <cb@256bit.org>