Problem: :setglobal cannot use script-local function for "expr" option.
Solution: Use the pointer to the option value properly. (closesvim/vim#11883)
01d4efe2e8
Problem: Adding a line below the last one does not expand fold.
Solution: Do not skip mark_adjust() when adding lines below the last one.
(Brandon Simmons, closesvim/vim#11832, closesvim/vim#10698)
da3dd7d857
Co-authored-by: Brandon Simmons <simmsbra@gmail.com>
Problem: Invalid memory access with folding and using "L".
Solution: Prevent the cursor from moving to line zero.
232bdaaca9
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Cannot use a script-local function for 'foldtext'.
Solution: Expand "s:" and "<SID>". (Yegappan Lakshmanan, closesvim/vim#9411)
27708e6c7b
Only port the changes actually related to 'foldtext'.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Problem: It is not easy to use a script-local function for an option.
Solution: recognize s: and <SID> at the start of the expression. (Yegappan
Lakshmanan, closesvim/vim#9401)
8bb65f230d
Omit duplicate docs in fold.txt: removed in a later runtime update.
Cherry-pick test_diffmode.vim changes from patch 8.2.1432.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Problem: Not enough folding code is tested.
Solution: Add more test cases. (Yegappan Lakshmanan, closesvim/vim#8046)
5c504f680e
Reorder test_fold.vim to match upstream.
Cherry-pick Test_fold_expr_error() from patch 8.2.0633.
Cherry-pick syntax feature check from patch 8.2.1432.
Cherry-pick a delete() call from patch 8.2.2112.
Problem: Solution for "!!sort" in closed fold is not optimal.
Solution: Use a different range instead of the subtle difference in handling
a range with an offset. (issue vim/vim#11487)
9954dc39ea
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: "!!sort" in a closed fold sorts too many lines.
Solution: Round to end of fold after adding the line count. (closesvim/vim#11487)
f00112d558
N/A patches for version.c:
vim-patch:9.0.0855: comment not located above the code it refers to
Problem: Comment not located above the code it refers to.
Solution: Move the comment. (closesvim/vim#11527)
09a93e3e66
vim-patch:9.0.0859: compiler warning for unused variable
Problem: Compiler warning for unused variable.
Solution: Add #ifdef.
fd3084b6e2
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: Check for features implemented with "if".
Solution: Use the Check commands. (Ken Takata, closesvim/vim#7383)
aeb313f355
Cherry-pick test_compiler.vim changes from patch 8.1.2373.
Problem: Tests use hand coded feature and option checks.
Solution: Use the commands from check.vim in more tests.
8c5a278fc5
Omit Test_wincolor(): there are later patches that touch that function.
Omit test_memory_usage.vim: a Lua test is used for that file.
Cherry-pick Test_issue_3969() from patch 8.1.0969.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Problem: With 'foldmethod' "indent" some lines are not included in the
fold. (Oleg Koshovetc)
Solution: Fix it. (Brandon Simmons, closesvim/vim#10399, closesvim/vim#3214)
d98e75e236
Problem: Pasting text while indent folding may mess up folds.
Solution: Adjust the way folds are split. (Brandon Simmons, closesvim/vim#10254)
2c40707baa
We should now be equal with Vim in regards to method call support of already ported built-ins.
Enable all relevant commented-out uses of the syntax in tests that I could grep.
Adds method call support for all functions in the patch, but it cannot
be fully ported due to missing tests for:
- filereadable(): requires v8.1.1378 for Test_delete_rf(), but there
appears to have been some trouble porting it. (#12784)
- confirm(): requires v8.1.0832 for Test_confirm() and v8.1.0815 for
feedkeys()'s "L" flag.
(I did attempt to port the test using nvim_input() instead,
but seems that input handling for confirm() doesn't work in
--headless mode?)
Note that confirm() was actually added as a method in
v8.1.1915.
Uncomment use of method call syntax in Test_Executable() previously
included instead from v8.2.2259.
Problem: "gj" in a closed fold does not move out of the fold. (Marco Hinz)
Solution: Add a check for being in a closed fold. (closesvim/vim#8062)
3c49e74e18
N/A patches for version.c:
vim-patch:8.2.2709: the GTK GUI has a gap next to the scrollbar
Problem: The GTK GUI has a gap next to the scrollbar.
Solution: Calculate the scrollbar padding for GTK. (closesvim/vim#8027)
26af8e54ff
vim-patch:8.2.2717: GTK menu items don't show a tooltip
Problem: GTK menu items don't show a tooltip.
Solution: Add a callback to show the tooltip. (Leonid V. Fedorenchik,
closesvim/vim#8067, closesvim/vim#7810)
ce5b06a6a9
Problem: Crash with a sequence of fold commands.
Solution: Bail out when there are no folds at all. Add a test (Dominique
Pellé) (closesvim/vim#7515)
6a78f32844
N/A patches for version.c:
vim-patch:8.2.2174: Mac version doesn't specify the CPU architecture
Problem: Mac version doesn't specify the CPU architecture.
Solution: Add "arm64" or "x86_64". (Yee Cheng Chin, closesvim/vim#7519)
8c9d98a8af
vim-patch:8.2.2175: github actions: clang-11 handling suboptimal
Problem: Github actions: clang-11 handling suboptimal.
Solution: Separate step of installing clang-11. Get ubuntu release name
dynamically. (Ozaki Kiichi, closesvim/vim#7514)
9aff970204
Problem: Crash when recreating nested fold.
Solution: Check for empty growarray. (closesvim/vim#7278)
5e1f22ff61
N/A patches for version.c:
vim-patch:8.2.1974: Vim9: test for has('gui_running') fails with VIMDLL
Problem: Vim9: test for has('gui_running') fails with VIMDLL.
Solution: Adjust the #ifdef. (Ken Takata, closesvim/vim#7276)
29b281ba8d
Problem: Using "x" before a closed fold may delete that fold.
Solution: Do not translate 'x' do "dl". (Christian Brabandt, closesvim/vim#4927)
7a9bd7c1e0
Problem: Skipped tests are not properly listed.
Solution: Throw a "Skipped" exception instead of using ":finish" or ":return".
5d30ff1964
Skips quite some (N/A) tests.
vim-patch:8.1.0503: missing change to diff test (included in cf1ffa916)
Problem: Ml_get error when deleting fold marker.
Solution: Check that the line number is not below the last line. Adjust the
fold when deleting the empty line. (Christian Brabandt,
closesvim/vim#4834)
9a4a8c4d59
Problem: When 'rnu' is set folded lines are not displayed correctly.
(Vitaly Yashin)
Solution: When only redrawing line numbers do draw folded lines.
(closesvim/vim#3484)
7701f30856
---
Explanation:
Before this patch, relative line numbers would update on a cursor
movement and overwrite fold highlighting in the line number columns.
Other operations can cause the fold highlighting to overwrite the line
number styles. Together, this causes the highlighting in the line number
columns to flicker back and forth while editing.
Test case: create `t.vim` with these contents:
set fdm=marker rnu foldcolumn=2
call setline(1, ["{{{1", "nline 1", "{{{1", "line 2"])
and then call `nvim -u NORC -S t.vim` and press `j`; observe that the fold
highlighting disappears.
Problem: 'commentstring' not used when adding fold marker in C.
Solution: Require white space before middle comment part. (mostly by
Hirohito Higashi)
4af7259b2b
Problem: 'commentstring' not used when adding fold marker. (Maxim Kim)
Solution: Only use empty 'comments' middle when leader is empty. (Christian
Brabandt, closesvim/vim#3670)
539328197c
Problem: Still too many old style tests.
Solution: Convert a few more tests to new style. (Yegappan Lakshmanan,
closesvim/vim#2272)
430dc5d360
Skip Test_tag_file_encoding.
083_tag_search_with_file_encoding_spec.lua handles the same test case.
vim-patch:8.0.0469: compiler warnings on MS-Windows
Problem: Compiler warnings on MS-Windows.
Solution: Add type casts. (Christian Brabandt)
0c0d4eca4d
vim-patch:8.0.0581: moving folded text is sometimes not correct
Problem: Moving folded text is sometimes not correct.
Solution: Bail out when "move_end" is zero. (Matthew Malcomson)
94be619e30
vim-patch:8.0.0583: fold test hangs on MS-Windows
Problem: Fold test hangs on MS-Windows.
Solution: Avoid overflow in compare.
b11c826ddc
When foldUpdateIEMSRecurse() re-uses an existing fold, it misses the
case where the existing fold spans from before startlnum to after
firstlnum, the new fold does not span this range, and there is no
"forced start" of a fold. We add a case for this in.
Ensure that if there was no forced break in folds, we merge folds that
now touch each other.
Include testing for a tricky foldmethod=expr case that has never been a
bug. This case works at the moment because of some effects that are not
obvious when reading the code.
A test for this could be useful to ensure a regression doesn't happen.
vim-patch:8.0.0408
In order to re-order marks according to the :move command, do_move()
uses mark_adjust() in a non-standard manner. The non-standard action is
that it moves some marks *past* other marks. This doesn't matter for
marks, but mark_adjust() calls foldMarkAdjust() which simply changes
fold starts and lengths and doesn't have enough information to know that
other folds have to be checked and reordered.
The array of folds for each window are assumed to be in order of
increasing line number, and if this gets broken some folds can get
"lost".
There has been a previous patch to avoid this problem by deleting and
recalculating all folds in the window, but this comes at the cost of
closing all folds when executing :move, and doesn't cover the case of
manual folds.
This patch adds a new function foldMoveRange() specifically for the
:move command that handles reordering folds as well as simply moving
them. Additionally, we allow calling mark_adjust_nofold() that does the
same as mark_adjust() but doesn't affect any fold array.
Calling mark_adjust_nofold() should be done in the same manner as
calling mark_adjust(), but according changes to the fold arrays must be
done seperately by the calling function.
vim-patch:8.0.0457
vim-patch:8.0.0459
vim-patch:8.0.0461
vim-patch:8.0.0465
Problem: An address relative to the current line, ":.,+3y", does not work
properly on a closed fold. (Efraim Yawitz)
Solution: Correct for including the closed fold. (Christian Brabandt)
ded2782783