| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
vim-patch:9.2.1175: setreg() block width wrong for unprintable chars
When yanking, the width of a <c-v>{motion}y register
is determined by the virtual colums of the text. However
in setreg() in 'b' mode use an idosyncratic width measurement
where C0 control chars (ASCII 0x00 - 0x19) and invalid UTF-8 bytes
have width 1 instead of their display width (2 or 4 cells).
Consider the following test case:
let strings = ['"reference', '"Übel', "\"aa\x07bb", "\"qq\x82", "\"x\nbabbel"]
for string in strings
call append('$', string)
exec "normal G0\<c-v>$\"ay"
let one = getregtype('a')
if string != strings[-1]
call setreg("b", string, 'b')
let two = getregtype('b')
else
let two = "na"
endif
call setreg("c", [string], 'b')
let three = getregtype('c')
call append('$', '"yank: '.one.", string: ".two.", list: ".three)
endfor
AFter this fix, all the three ways of measuring the width gives
equal values (or two, in the case of not being able to use setreg()
with a plain string in the first case)
|
| |
|
|
|
|
|
|
| |
This is a neovim only regression. in vim mb_ptr2len_len is uses
which links to utfc_ptr2len_len
I am in the process of refactoring all of this, but let's get this
fix out with a good regression test.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
The magic globals `it`, `describe`, etc., are more trouble than they are
worth.
- Hooking into `after_each` requires `getfenv()` hacks.
- They confuse luals/emmylua, because the top-level `.luarc.json` isn't
merged with `test/.luarc.json` (apparently a luals limitation?)
- They totally defeat discoverability because the user just has to
"know" about the various magic symbols.
So they harm DX, which means they serve no purpose at all.
Solution:
- Expose the test API from `testutil`, so tests can call `t.it()`,
`t.describe()`, etc., in the conventional way.
- Drop `getfenv()` hacks.
- Drop the `setfenv()` injection in `load_chunk`.
- Drop `test/_meta.lua`.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(#40371)
Problem: ':delete #' silently fails to update "# and clobbers "0.
Solution: Treat "# like "/, writable only with :let and setreg().
closes: vim/vim#20592
https://github.com/vim/vim/commit/7aeab74687f92acff3ef3ab83a3c75dc0d3c2887
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
Indenting text is a common task in plugins/scripts for
presentation/formatting, yet vim has no way of doing it (especially
"dedent", and especially non-buffer text).
Solution:
Introduce `vim.text.indent()`. It sets the *exact* indentation because
that's a more difficult (and thus more useful) task than merely
"increasing the current indent" (which is somewhat easy with a `gsub()`
one-liner).
|
| |
|
|
|
|
|
|
|
| |
Specifically, functions that are run in the context of the test runner
are put in module `test/testutil.lua` while the functions that are run
in the context of the test session are put in
`test/functional/testnvim.lua`.
Closes https://github.com/neovim/neovim/issues/27004.
|
| | |
|
| |
|
|
| |
Work on https://github.com/neovim/neovim/issues/27004.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Problem: Inconsistent capitalization in error messages.
Solution: Make capitalization consistent. (Doug Kearns)
https://github.com/vim/vim/commit/cf030578b26460643dca4a40e7f2e3bc19c749aa
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
|
|
|
|
|
|
|
| |
Problem: Vim9: builtin function arguments not checked at compile time.
Solution: Add more type checks. (Yegappan Lakshmanan, closes vim/vim#8539)
https://github.com/vim/vim/commit/5b73992d8f82be7ac4b6f46c17f53ffb9640e5fa
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
Problem: Some tests are still old style.
Solution: Convert to new style tests. (Yegappan Lakshmanan, closes vim/vim#5957)
https://github.com/vim/vim/commit/08f4157c5cabc55bcb22f04dd7c717aba40caa34
Fix missing error message when sort() compare function fails.
Cherry-pick a line in test_utf8.vim from patch 8.2.0448.
Cherry-pick builtin_function() change from patch 8.2.0595.
|
| |
|
|
|
| |
Copy test_regex_char_classes.vim from upstream to avoid future encoding
problems.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
Problem: Test files still use function!.
Solution: Remove the exclamation mark. Fix overwriting a function.
https://github.com/vim/vim/commit/1e1153600c0377472d62cc553173fe555ddcf5a7
Some of the changes were already applied previously.
|
| |
|
|
|
|
|
|
|
|
|
| |
Problem: Cannot save and restore a register properly.
Solution: Add getreginfo() and make setreg() accept a dictionary. (Andy
Massimino, closes vim/vim#3370)
https://github.com/vim/vim/commit/bb861e293e0170455184079fa537278754b07911
Cherry-pick eval.txt changes for getreginfo() from:
https://github.com/vim/vim/commit/6aa57295cfbe8f21c15f0671e45fd53cf990d404
https://github.com/vim/vim/commit/207f009326c8f878defde0e594d7d9ed9860106e
|
| | |
|
| |
|
|
|
| |
The commit summary maybe does not make sense, but calling a function
that does not wait on anything `wait()` makes even less sense.
|
| | |
|
| |
|
|
|
|
|
|
| |
Also:
Add ru to shada tests with all keys
Add test for unset unnamed and register 0
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Hope this will make people using feed_command less likely: this hides bugs.
Already found at least two:
1. msgpackparse() will show internal error: hash_add() in case of duplicate
keys, though it will still work correctly. Currently silenced.
2. ttimeoutlen was spelled incorrectly, resulting in option not being set when
expected. Test was still functioning somehow though. Currently fixed.
|
| | |
|
| |
|
|
|
|
| |
It is otherwise impossible to determine which test failed sanitizer/valgrind
check. test/functional/helpers.lua module return was changed so that tests which
do not provide after_each function to get new check will automatically fail.
|
| |
|
|
|
| |
vim-patch:7.4.1755
this prevents a crash when the list is used in setreg() later
|
| |\
| |
| | |
vim-patch:7.4.1105
|
| | |
| |
| |
| |
| |
| |
| | |
Problem: When using slices there is a mixup of variable name and namespace.
Solution: Recognize variables that can't be a namespace. (Hirohito Higashi)
https://github.com/vim/vim/commit/9bbf63dbf8286fadc0cd6b3428010abb67b1b64d
|
| |/
|
|
|
|
|
| |
The hexadecimal notation is a Luajit extension which is not compatible with Lua
5.1. While Lua 5.2 does support hexadecimal sequences, it is better to target
Lua 5.1 for maximum compatibility with Luajit(which has fully compatible with
5.1 API/ABI).
|
| | |
|
| | |
|
| |
|
|
|
|
| |
As the work of this migration did take quite some time, some changes where
made in master after this branch was started. These are ported to the new
test file.
|
| |
|
|
| |
Helped-by: Justin M. Keyes <justinkz@gmail.com>
|
| |
|
|
|
|
| |
The old test_eval.in file did a `:wq` on line 168. The following 60 lines
where not used and there was no expected output for them in test_eval.ok.
This test code is now used in several test cases in the new test file.
|
| | |
|
| | |
|
| |
|