Problem: When items are combined with user-defined highlight attributes
(e.g., strikethrough), trunc inherits these attributes, making
the text difficult to read.
Solution: trunc now uses the original Pmenu and PmenuSel highlight
attributes (glepnir)
closes: vim/vim#173400816f17e9a
Co-authored-by: glepnir <glephunter@gmail.com>
* Don't specify wayclip mimetype
Problem: Since wayclip 0.2, wayclip assumes UTF-8
(text/plain;charset=utf-8) in absence of an explicit mimetype.
Since Neovim sets the mimetype to "text/plain" without
specifying UTF-8, you will also have to use `-t text/plain`
when using waypaste or wayclip outside of Neovim.
Solution: Don't specify mimetype when using wayclip, thereby using the
default "text/plain:charset=utf-8".
* Add primary clipboard support to wayclip
wayclip have had support for primary clipboard for some time now.
---------
Co-authored-by: Fredrik Foss-Indrehus <fred@ffoss.net>
- Normalise interface heredoc highlighting with that used for
:let-heredocs.
- Remove interface feature testing. The Lua and Python interface
command scripts are now highlighted by default. Loading all syntax
files incurs an undesirable load-time burden so highlighting of the
less popular MzScheme, Perl, Ruby and Tcl interfaces is disabled by
default. g:vimsyn_embed can still be used to customise the supported
interfaces.
- Always highlight interface ex-commands as valid commands, even when
the corresponding command-script highlighting is disabled.
- Highlight simple command-script statements as well as heredocs.
- Remove error highlighting of heredoc and statement command-script
regions when an interface is disabled. These are now highlighted as
plain text.
- Allow indented heredoc end tokens when "trim" is specified.
- Match interface heredocs in :def functions.
- Fix runaway vimEmbedError regions. These regions have been removed.
- Use python2 syntax for :python, and :pythonx when 'pyxversion' is
appropriately set.
closes: vim/vim#15522a577e4289c
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
feat(logs): show full path of short_src in lsp logs
Problem:
- Cannot gf to info.short_src printed in the logs since only the last 16
characters are printed
Solution:
- Print full info.short_src and remove ...
This check was always broken. it will "detect" a file as
other-than-UTF-8 if the first line of a help file only is ASCII.
This only works by accident, as all our help files are UTF-8 (or
ASCII-only, which is fully compatible), but are all ASCII-only
on the first line of every help file which means that all helpfiles
gets detected as not-UTF8 which makes the "consistency" test pass
by accident even though the actual consistency is that every single
file is UTF-8 compatible. This means that the
"!_TAG_FILE_ENCODING\tutf-8\t" meta-tag already did not get emitted
but YAGNI in either case as no encoding tag just means that 'encoding'
is used which in neovim always is UTF-8 anyway.
An alternative approach would be to integrate the real encoding
detection already present in the codebase (an editor which edits text of
various encodings) which checks the entire file instead of a weird
first-line-only-hack, but as it happens to be 2025 the resolution of
encoding trouble is to just use UTF-8 everywhere. And if you use something
else you have to keep track yourself anyway it is not like we can detect
if one helpfile of your plugin is latin-1 and another is latin-2 or
whatever. Also, Nvim will detect the encoding of the file when you open
the file as a :help buffer anyway.
Problem: <Tab> is not translated on the cmdline, and exposes a wrong
assumption in search messages that may contain multiple chunks.
Solution: Translate unprintable characters in the cmdline content.
Extract the 'search_count' from the last chunk and route
'search_cmd' to cmdline to handle multiple chunks.
Problem: The 'grepformat' option is global option, but it would be
useful to have it buffer-local, similar to 'errorformat' and
other quickfix related options (Dani Dickstein)
Solution: Add the necessary code to support global-local 'grepformat',
allowing different buffers to parse different grep output
formats (glepnir)
fixes: vim/vim#17316closes: vim/vim#173157b9eb6389d
Co-authored-by: glepnir <glephunter@gmail.com>
Problem: search_stat not reset when pattern differs in case
(tahzibijafar)
Solution: use STRNCMP instead of MB_STRNICMP macro
There was a long standing todo comment, that using MB_STRNICMP is wrong.
So let's change it to STRNCMP() instead. Even if it not handle
multi-byte characters correctly, then Vim will rather recompute the
search stat, instead of re-using the old (and possibly wrong) value.
fixes: vim/vim#17312closes: vim/vim#17314670d0c1468
Co-authored-by: Christian Brabandt <cb@256bit.org>
This just cleans up some old definitions from before tui_set_term_mode
existed. There is no need to represent custom modes in a different
format just because they are safe without feature detection.
Previously the incorrect regexp forced title to be a single letter
because of using '+' instead of the '\+' regexp modifier.
closes: vim/vim#173211aa68dffbf
Co-authored-by: Alexander Abrosimov <alexander.n.abrosimov@gmail.com>
Problem: The check in buf_freeall that restores curwin subtly prevents
leaving an unloaded buffer in a window when reusing curbuf, if
autocommands switch to a different buffer.
Solution: Add a test case that covers this. Also ensure splitting isn't
possible, as that could do the same (Sean Dewar)
closes: vim/vim#1732531be82e66d
Co-authored-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
According to terminfo(5), these are obsolete:
Except for very old terminal descriptions, e.g., those developed
for SVr4, the scheme just described should be considered obsolete.
An improved set of capabilities was added late in the SVr4
releases (smglr and smgtb), which explicitly use two parameters
for setting the left/right or top/bottom margins.
Current "patch" asserts that EVERY terminal claiming to be an xterm has
broken vertical split scrolling which is far too an aggressive
workaround.
Instead, as left-right margins for scrolling regions use a
private DEC mode, we can use feature detection to use them in supported
terminals only. This way, users who use properly implemented terminals
can enjoy hardware accelerated scrolling even with vertical split
windows.
Problem: Incorrect message highlighting for highlighted message
chunks containing carriage returns.
Solution: Add a highlight for each substring ending in a newline or
carriage return separately.
A primary device callback may set a new callback (e.g. when suspending),
so clearing it after invoking it is too late.
While at it, add missing reset of did_set_grapheme_cluster_mode in
terminfo_start().
Problem: One-off error in "count" to make "w_skipcol" zero with
'nosmoothscroll' page scrolling when last virtual line
in a buffer line is exactly the entire window width.
(Hirohito Higashi)
Solution: Properly compute the smallest integer value necessary
to make "w_skipcol" zero (Luuk van Baal)
c6c72d165c
Problem: buflist_new() leaks ffname and fails to reuse curbuf when
autocommands from buf_freeall change curbuf. Plus, a new
buffer is not allocated in this case, despite what the comment
above claims.
Solution: Remove the condition so ffname is not leaked and so a new
buffer is allocated like before v8.2.4791. It should not be
possible for undo_ftplugin or buf_freeall autocommands to
delete the buffer as they set b_locked, but to stay consistent
with other uses of buf_freeall, guard against that anyway
(Sean Dewar).
Note that buf is set to NULL if it was deleted to guard against the (rare)
possibility of messing up the "buf != curbuf" condition below if a new buffer
happens to be allocated at the same address.
closes: vim/vim#173190077282c82
Co-authored-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Problem: Cannot get completion startcol when space is not the first
trigger character (after v9.1.1383)
Solution: Detect the next comma followed by a space in the option string
and use in next compare loop (glepnir)
closes: vim/vim#1731108db2f4f28
Problem: Hint message to press "g<" for message that spills
'cmdheight' is too intrusive.
Solution: Remove the hint message. Document the meaning of the spill
indicator instead.
Problem: Carriage return should place the "write cursor" at the start of a line.
Solution: Construct the to be printed line by iterating over carriage returns.
This is a left-over for when we ported to state-less scrolling events
(e.g. no scrolling regions as part of the ext_linegrid state).
We always reset the scrolling region after performing a non-fullscreen
scroll. Thus the extra check in tui_grid_resize() is not needed.
Problem: Decision whether message is sent to "more" window is based on
the number of newlines present in a message, rather than the
actual text height.
With the "box" target, messages that come from a cmdline
entered command are not always routed to the more window.
Solution: Still write the message to the target buffer, and calculate
the actual text height. Postpone updating several state
variables until after the decision to re-route is made.
With the "box" target, only consider the text height of the
message if it is not a message from a cmdline entered command.
Problem: Extui shows a spill indicator to hint to the user to press "g<"
to show the output of the last command. The user may be
unaware of this mapping.
Solution: Route a hint message to the message "box" window.
Problem: Loop that ensures "w_skipcol" is zero with 'nosmoothscroll'
for (half)-page scrolling is inefficient.
Solution: Calculate the required "count" instead of looping until
"w_skipcol" is zero (Luuk van Baal).
acf0ebe8a8
Problem: When a space character is used as a trigger in 'isexpand' option
it doesn't get recognized because skip_to_option_part() skips
spaces after a comma, treating them as option separators
rather than option value (after v9.1.1341)
Solution: manually set the part to a space character (glepnir).
closes: vim/vim#173058d0e42b710
Problem:
The scope `elseif $LC_MESSAGES =~ '\a\a' || $LC_MESSAGES ==# "C"` in
function `s:Locale` in file `runtime/autoload/tutor.vim` leaves a case
when l:lang is not defined.
Solution:
Define `l:lang` at function scope instead of `if` scope
Problem: still some problem with the new tutors filetype plugin
Solution: refactor code to enable/disable tutor mode into
tutor#EnableInteractive() function, include a test
(Phạm Bình An)
I find it annoying that Tutor's interactive mode is always on (or debug
mode is off) even when I open a tutor file with :edit command.
I think it makes more sense to make this "interactive mode":
- Always on when it is opened with :Tutor command
- Off otherwise
For more references, see `:help` feature, it is a much better than
:Tutor, since I don't have to run `:let g:help_debug = 1` just to be able
to edit and save a help file
Therefore, I remove `g:tutor_debug`
closes: vim/vim#1729913bea589a2
Co-authored-by: Phạm Bình An <phambinhanctb2004@gmail.com>
- Set g:tutor_debug on startup if it doesn't exist so that users can get
cmdline completion when interactively setting it.
- set b:undo_ftplugin in filetype plugin
- set default runtime file headers
closes: vim/vim#172743704b5b58a
Co-authored-by: Phạm Bình An <phambinhanctb2004@gmail.com>