Problem: tests: test_sort.vim leaves swapfiles behind
Solution: Close open buffers using :bw! instead of :close!
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: sort() does not handle large numbers correctly
(Igbanam Ogbuluijah)
Solution: Don't truncate the return value of tv_get_number_chk()
(Yegappan Lakshmanan)
closes: #18868
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Setting a byte in a blob, accepts values outside 0-255
Solution: When setting a byte in a blob, check for valid values
(Yegappan Lakshmanan)
closes: #18870
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: gui_mch_set_titlebar_colors() doesn't need to be called when
'go+=C' is not set.
Solution: Switch the default value to false.
closes: #18872
Signed-off-by: Mao-Yining <mao.yining@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
- cleanup of PR for tearing and other output options
- removed `allow_tearing` from global keywords (it's only an output option)
- moved `...clockwise` directives from general to transform options
- separated `icc` highlight to correctly detect and highlight paths
- updated output bg to use the same approach as `icc` for file path
- separated all identifier-matchers into their own groups
- added support for bar identifiers
closes: #18851
Signed-off-by: Josef Litoš <54900518+litoj@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
- mapped all identifier-highlighting groups to a new group `i3ConfigIdent`
- i3config bar is now split into keyword and block matches
- support `xft:` namespace in fonts
- Update maintainer information in i3config.vim
related: #18851
Signed-off-by: Josef Litoš <54900518+litoj@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: need better tests for tf files
Solution: Add better filetype test for terraform/tf filetype
closes: #18339
Signed-off-by: Christian Brabandt <cb@256bit.org>
- Match \dE\d real literal form
- Match all string escape sequences
- Add related tests
closes: #18723
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: Test_windows_external_cmd_in_cwd() is only run in huge
builds (after 9.1.1947).
Solution: Move it to test_system.vim so that it is run in normal builds.
closes: #18853
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: Test_tagjump.vim leaves swapfiles behind
Solution: Close open buffers using :bw! instead of :close!
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: :stag does not use 'swichtbuf' option, though the
documentation states differently
(Christian Brabandt)
Solution: Respect 'switchbuf' option (Yegappan Lakshmanan).
related: #18845closes: #18856
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Windows: Vim always adds the current directory to search path.
This should only happen when using cmd.exe as 'shell'. For
example, powershell won't run binaries from the current
directory.
Solution: Only add current directory to system path, when using cmd.exe
as 'shell'.
related: #10341
related: 083ec6d9a3
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: [security]: Windows: Vim may execute commands from current
directory (Simon Zuckerbraun)
Solution: Set the $NoDefaultCurrentDirectoryInExePath before running
external commands.
Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-g77q-xrww-p834
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Cannot open the help in the current window
Solution: Promote the example from tips.txt to a proper package and
include the helpcurwin package, add tests for it
(Peter Kenny)
closes: #18840
Signed-off-by: Peter Kenny <github.com@k1w1.cyou>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: Test_getbufwintabinfo() leaves swapfiles behind
Solution: Close all open buffers using %bw!
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: gewininfo() does not return if statusline is visible
Solution: Add status_height to the dict items returned by
getwininfo() (Hirohito Higashi)
closes: #18841
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Memory leak with :breakadd expr
Solution: Free debug_oldval and debug_newval before assigning to them.
Verify the existing (though confusing) :breakadd expr behavior
(zeertzjq).
It seems that :breakadd expr doesn't work as documented at all. This PR
only fixes the memory leak. The tests are for the existing behavior.
closes: #18844
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Assignment to read-only registers @: and @% is allowed during
compilation.
Solution: Abort compilation and emit an E354 error when assigning to
these registers (Doug Kearns).
Fix the E354 error emitted when attempting to declare @: with :var so
that it references the correct register, @:, rather than the garbage
string "^@".
closes: #18806
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: Test_execute_register() leaves swapfile behind
Solution: Use :bw instead of :close to close the buffer completely
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: clipboard registers "+" and "*" synced without "autoselect"
Solution: Remove code that explicitly syncs those clipboard registers
(Corey Hickey)
Before this change, writes to '+' get copied to '*', but only under
certain conditions. By default, this does not happen, because clipboard
"autoselect" (via :set clipboard+=autoselect) is enabled. Disabling
"autoselect" (an option which should only apply to visual mode) results
in normal-mode writes such as "+yy also going to the '*' register.
This behavior is undocumented and untested; remove the behavior in order
to make Vim's handling of these two registers be consistent.
This frees up the did_star variable to be removed.
Add a test to check that the registers are independent.
fixes: #18830closes: #18831
Signed-off-by: Corey Hickey <bugfood-c@fatooh.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: excessive wait in Test_matchfuzzy_initialized
Solution: Use term_wait() instead of the TermWait() wrapper
(Corey Hickey)
Test_matchfuzzy_initialized is a terminal test, which are specified to be
"flaky" and automatically retried. The TermWait wrapper multiplies the
specified wait time by higher values for later retries, maxing out at
10x the specified value. This makes tries #3 to #6 sleep for 20 seconds
each, which makes the test very slow to work with. The specified intent
of the test (as noted in a comment eight lines above here) is to
sleep for 2s.
closes: #18822
Signed-off-by: Corey Hickey <bugfood-c@fatooh.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: Test_matchfuzzy_initialized() fails
Solution: Send a dummy key (Corey Hickey)
Test_matchfuzzy_initialized seems to expect that the 'lvimgrep' will be
interrupted by sending a SIGINT. If the search finishes beforehand,
though, then the SIGINT triggers vim to tell the user how to quit.
Vim does not show this message immediately, though; instead, vim shows
the message next time it is active. When StopVimInTerminal() sends a key
sequence intended to cause vim to quit, this activates vim to show the
message instead of quitting.
I do not understand every detail of the problem fully--if I type the
characters from StopVimInTerminal() into a post-SIGTERM terminal
directly, that seems to work ok; there seems to be a timing issue due to
sending all the characters at once.
This fix does make the test work reliably for me, and the test still
works even if I limit my CPU frequency so that the search is interrupted
by the SIGINT.
fixes: #18821
related: #18822
Signed-off-by: Corey Hickey <bugfood-c@fatooh.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: filetype: Erlang lexical files are not recognized
Solution: Detect *.xrl files as leex filetype, include syntax and
filetype plugins (Jon Parise).
leex is the lexical analyzer generator for Erlang. Its input file format
follows a section-based structure and uses the `.xrl` file extension.
This initial work includes file detection, an ftplugin (which inherits
the Erlang configuration), and a syntax definition.
Reference:
- https://www.erlang.org/doc/apps/parsetools/leex.html
related: #18819closes: #18832
Signed-off-by: Jon Parise <jon@indelible.org>
Signed-off-by: Csaba Hoch <csaba.hoch@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: filetype: not all Erlang files are recognized
Solution: Detect *.app.src and rebar.config files as erlang filetype
(John Parise).
*.app.src files contain Erlang application definitions. (There are also
*.app files, which are similar but more often build artifacts, and that
file extension is too ambiguous to be recognized by default.)
Reference:
- https://www.erlang.org/doc/system/applications.html
Rebar is the Erlang build tool. rebar.config uses Erlang syntax.
Reference:
- https://rebar3.org/docs/configuration/configuration/closes: #18835
Signed-off-by: Jon Parise <jon@indelible.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
The pattern argument is optional. See :help :sort for another example.
closes: #18834
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Add `g:` prefix, so the example works in vim9script as well (errors
without it).
closes: #18827
Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: C.D. MacEachern <craig.daniel.maceachern@gmail.com>
Make it clear that the overall end value can be greater than
line('$') + 1.
fixes: #18664closes: #18828
Signed-off-by: Paul Ollis <paul@cleversheep.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: completion: complete_match() Vim script function and
'isexpand' option are not that useful and confusing
(after v9.1.1341)
Solution: Remove function and option and clean up code and documentation
(Girish Palya).
complete_match() and 'isexpand' add no real functionality to Vim. They
duplicate what `strridx()` already does, yet pretend to be part of the
completion system. They have nothing to do with the completion mechanism.
* `f_complete_match()` in `insexpand.c` does not call any completion code.
It’s just a `STRNCMP()` wrapper with fluff logic.
* `'isexpand'` exists only as a proxy argument to that function.
It does nothing on its own and amounts to misuse of a new option.
The following Vim script function can be used to implement the same
functionality:
```vim
func CompleteMatch(triggers, sep=',')
let line = getline('.')->strpart(0, col('.') - 1)
let result = []
for trig in split(a:triggers, a:sep)
let idx = strridx(line, trig)
if l:idx >= 0
call add(result, [idx + 1, trig])
endif
endfor
return result
endfunc
```
related: #16716fixes: #18563closes: #18790
Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: completion: 'completefuzzycollect' option is too obscure
Solution: Deprecate the option, but don't error out for existing scripts,
behave like 'completefuzzycollect' is set when fuzzy
completion is enabled (Girish Palya).
fixes: #18498closes: #18788
Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
- Change "Prepended" (past tense) to "Prepend" (present tense,
imperative).
- Add short examples clarifying the behavior of prepending a count to
commands that jump to changes in diff mode.
closes: #18810
Signed-off-by: Brent Pappas <pappasbrent@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>