Problem: colorcolumn not drawn after virtual text lines
Solution: show colorcolumn on correct line with virtual text by adding
the size of p_extra to virtual column offset (Matthias)
When a line has two or more lines of virtual text above it, the color
column used to appear on the line of the second virtual text line, while
the first virtual text line and the "real" text line did not have a
color column.
The color column for "above" virtual text is positioned by taking the
offset of the size of the virtual text lines and subtracting it from the
"virtual column" that we are in. If the result equals the color column,
this column is colored.
The "virtual column" is calculated from the beginning of the first
virtual text line and continues over the newlines up to the end of the
"real" text. However, the offset from the virtual text was reset at
every line.
Adding all those offsets together leads to the color column being placed
consistently at the line of the "real" text.
related: #12004
related: #16868closes: #16904
Signed-off-by: Matthias <matthias.rader@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: MS-Windows: not correctly restoring alternate screen on Win 10
after ssh (Daniel Viberg)
Solution: return a bit later in RestoreConsoleBuffer()
(Christopher Plewright)
fixes: #16418closes: #16897
Signed-off-by: Christopher Plewright <chris@createng.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: test_filetype fails when a file is a directory
(Eisuke Kawashima)
Solution: When encountering a directory instead of a file, skip that
particular filetype test
fixes: #16894
Signed-off-by: Christian Brabandt <cb@256bit.org>
So let's remove the symlink and copy the netrw documentation back into
runtime/doc directory. While at it, add a Makefile target to do this
whenever runtime/pack/dist/opt/netrw/doc/netrw.txt is updated.
fixes: #16878fixes: #16872
Co-authored-by: Brandon Maier <brandon.maier@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: completion: preinserted text not removed when closing pum
Solution: delete preinsert text inside in ins_compl_stop() (glepnir).
closes: #16891
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: MS-Windows: crash when passing long string to expand() with
'wildignorecase'.
Solution: Use the same buflen as unix_expandpath() in dos_expandpath().
Remove an unnecessary STRLEN() while at it (zeertzjq).
closes: #16896
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: matchparen keeps cursor on case label in sh filetype
(@categorical, after 9.1.1187).
Solution: Use :defer so that cursor is always restored, remove checks
for older Vims, finish early if Vim does not support :defer
fixes: #16887closes: #16888
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Synchronisation was lost in commit 0fab891 and the error propagated to
the output file in commit 5606ca5.
closes: #16889
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
- 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: #16871
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Add chapter two to the Serbian translation of the new tutor.
Update the Filelist with two new files.
closes: #16875
Signed-off-by: Ivan Pešić <27575106+eevan78@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Cmdline pum not cleared for input() completion.
Solution: Temporary reset RedrawingDisabled in cmdline_pum_cleanup(),
like what is done in wildmenu_cleanup() (zeertzjq).
fixes: #16874closes: #16876
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Many X11/Wayland desktops support icon themes, and many themes
provide a gvim icon, but this icon is ignored for the window
itself because it is hardcoded in the source code.
Solution: Read the icon from the theme instead (Aurelien Gateau).
closes: #16859
Signed-off-by: Aurelien Gateau <mail@agateau.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: [security]: potential data loss with zip.vim and special
crafted zip files (RyotaK)
Solution: use glob '[-]' to protect filenames starting with '-'
Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-693p-m996-3rmf
Signed-off-by: Christian Brabandt <cb@256bit.org>
"umask" is pronounce like "youmask", so having an "an" before it is a
bit strange. In other places in the help, "umask" is not preceded by
either "a" or "an", and sometimes preceded by "the".
Also, "Note" is usually followed either by ":" or "that" in builtin.txt,
so add a ":" after "Note".
closes: 16860
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: inside try-block: fn body executed when default arg is
undefined
Solution: When inside a try-block do not execute function body after an
error in evaluating a default argument expression
(Shane Harper).
closes: #16865
Signed-off-by: Shane Harper <shane@shaneharper.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: the highlight-yank plugin exmaple provided in the doc behaves
incorrectly when selection is set to exclusive.
Solution: use a unified offset of 1 and pass 'exclusive: false' to
getregionpos(), while at it, also clarify when the
TextYankPost autocommand triggers.
closes: #16866
Signed-off-by: Jim Zhou <jimzhouzzy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: filetype: false positive help filetype detection
Solution: Only detect a file as help if modeline appears either at start
of line or is preceded by whitespace (zeertzjq).
closes: #16845
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
On man-db systems, complete with actual man sections and pages, instead
of shell commands.
I tried to come up with a portable solution for multiple man
implementations in https://github.com/vim/vim/discussions/16794 but I
think the differences between implementations were too large to do that
without overly complicated code. So instead, I implemented it for man-db
(which I think is common on Linux) and hopefully left it easier for
other people to implement it on other systems in the future if they want
to.
closes: #16843
Signed-off-by: David Mandelberg <david@mandelberg.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Unnecessary use of STRCAT() in au_event_disable(). STRCAT()
seeks to the end of new_ei, but here the end is already known.
Solution: Use STRCPY() and add p_ei_len to new_ei. Also fix a typo in a
comment. Add a test that 'eventignore' works in :argdo
(zeertzjq).
closes: #16844
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim crashes with term response debug logging enabled and
running in a non-writeable directory
Solution: use ch_log() instead of custom termresponse logging function
(Hirohito Higashi)
closes: #16840
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
- Only match valid predefined and option variables.
- Match scope dictionaries.
- Highlight scope prefixed variables as a scope dictionary accessor. The
vimVarScope syntax group can be linked to vimVar to disable this.
- Include support for Neovim-only predefined and option variables.
Temporary collateral damage - scope dictionaries match instead of keys
in dictionary literals.
closes: #16727
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Test for patch 9.1.1186 doesn't fail without the patch.
Solution: Set 'nomodeline' in the test (zeertzjq).
closes: #16835
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: if_python: build error due to incompatible pointer types
Solution: cast pointer to PyObject* (oreo639)
Avoid build failure due to -Wincompatible-pointer-types becoming an error in
gcc 14.
When Py_LIMITED_API is < 0x030b0000, then the for Py_XDECREF must be PyObject*.
Vim targets Py_LIMITED_API = 0x03080000 (python 3.8).
closes: #16824
Signed-off-by: oreo639 <oreo6391@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: runtime(tera): tera support can be improved
Solution: update tera filetype plugin, include a tera syntax script
include tera syntax tests, update the filetype test,
update makemenu and synmenu vim scripts
(MuntasirSZN)
closes: #16830
Signed-off-by: MuntasirSZN <muntasir.joypurhat@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>