Age | Commit message (Collapse) | Author |
|
Problem: vi: d{motion} and cw command work differently than expected
Solution: add new cpo-z flag to make the behaviour configurable
There are two special vi compatible behaviours (or should I say bugs?):
1): cw behaves differently than dw. That is, because cw is special cased
by Vim and is effectively aliased to ce.
POSIX behaviour is documented here:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/vi.html#tag_20_152_13_81
2): d{motion} may make the whole delete operation linewise, if the start
and end of the motion are on different lines and there are only
blanks before the start and after the end of the motion.
Did not find a related POSIX link that requires this behaviour.
Both behaviours can be considered inconsistent, but we cannot easily
change it, because it would be a backward incompatible change and also
incompatible to how classic vi behaved.
So let's add the new cpo flag "z", which when not included fixes both
behaviours and make them more consistent to what users would expect.
This has been requested several times:
https://groups.google.com/d/msg/vim_use/aaBqT6ECkA4/ALf4odKzEDgJ
https://groups.google.com/d/msg/vim_dev/Dpn3xtUF16I/T6JcOPKN6usJ
http://www.reddit.com/r/vim/comments/26nut8/why_does_cw_work_like_ce/
https://groups.google.com/d/msg/vim_use/vunNWLFWfQg/MmJh_ZGaAgAJ
https://github.com/vim/vim/issues/4390
So in summary, if you want to have the w motion work more consistent,
remove the 'z' from the cpo settings.
related: #4390
closes: #15263
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: cbuffer and similar quickfix and locationlist commands don't
accept a range, even so it is documented they should
(ilan-schemoul, after 8.1.1241)
Solution: Define ex commands with ADDR_LINES instead of ADDR_OTHER
fixes: #14638
closes: #14657
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: cannot use buffer-number for errorformat
Solution: add support for parsing a buffer number using '%b' in
'errorformat'
closes: #13419
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
Problem: cannot store custom data in quickfix list
Solution: add `user_data` field for the quickfix list
closes: #11818
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Tom Praschan <13141438+tom-anders@users.noreply.github.com>
|
|
Problem: Quickfix text field is truncated.
Solution: Fix output of text field after pattern field in quickfix buffer.
(Shane Harper, closes #12498)
|
|
Problem: Some make output gets picked up by 'errorformat'.
Solution: Ignore make output by default. (Gregory Anders, closes #12481)
|
|
Problem: :stopinsert may not work in a popup close handler. (Ben Jackson)
Solution: Restore stop_insert_mode when appropriate. (closes #12452,
closes #12434)
|
|
Problem: Code style is not check in test scripts.
Solution: Add basic code style check for test files.
|
|
Problem: With "screenline" in 'culopt' cursorline highlight is wrong.
Solution: Apply the priority logic also when "screenline is in 'culopt'.
(closes #11696)
|
|
Problem: Callback name argument is changed by setqflist().
Solution: Use the expanded function name for the callback, do not store it
in the argument. (closes #11653)
|
|
Problem: Function name does not match autocmd event name.
Solution: Rename "optionsset" to "optionset". (closes #11630)
|
|
Problem: Filetype autocmd may cause freed memory access.
Solution: Set the quickfix-busy flag while filling the buffer.
|
|
Problem: Quickfix listing does not handle very long messages.
Solution: Use a growarray instead of a fixed size buffer. (Yegappan
Lakshmanan, closes #11357)
|
|
Problem: Too many delete() calls in tests.
Solution: Use deferred delete where possible.
|
|
Problem: Using common name in tests leads to flaky tests.
Solution: Rename files and directories to be more specific.
|
|
Problem: Crash when no errors and 'quickfixtextfunc' is set.
Solution: Do not handle errors if there aren't any.
|
|
Problem: Using freed memory when location list changed in autocmd.
Solution: Return QF_ABORT and handle it. (Yegappan Lakshmanan,
closes #10993)
|
|
Problem: Using freed memory when using 'quickfixtextfunc' recursively.
Solution: Do not allow for recursion.
|
|
Problem: Long quickfix line is truncated for :clist.
Solution: Allocate a buffer if needed.
|
|
Problem: In the quickfix window 'cursorline' overrules QuickFixLine
highlighting.
Solution: Combine the attributes. Add a test. (closes #10654)
|
|
Problem: Functions are global while they could be local.
Solution: Add "static". Add a few tests. (Yegappan Lakshmanan,
closes #10612)
|
|
Problem: "textlock" is always zero.
Solution: Remove "textlock" and rename "textwinlock" to "textlock".
(closes #10489)
|
|
Problem: Quickfix tests can be a bit hard to read.
Solution: Use heredoc instead of strings and line continuation. (Yegappan
Lakshmanan, closes #10145)
|
|
Problem: No completion for :scriptnames.
Solution: Implement :scriptnames completion. (Yegappan Lakshmanan,
closes #10005)
|
|
Problem: Memory allocation failures not tested in quickfix code.
Solution: Add alloc IDs and tests. (Yegappan Lakshmanan, closes #9848)
|
|
Problem: Not enough testing for quickfix code.
Solution: Add more tests. Fix uncovered problem. (Yegappan Lakshmanan,
closes #9839)
|
|
Problem: :helpgrep may free an option that was not allocated. (Yegappan
Lakshmanan)
Solution: Check if the value was allocated.
|
|
Problem: No support for end line number and column in 'errorformat'.
Solution: Add %e and %k. (closes #9624)
|
|
Problem: May end up with no current buffer.
Solution: When deleting the current buffer to not pick a quickfix buffer as
the new current buffer.
|
|
Problem: Using freed memory with :lopen and :bwipe.
Solution: Do not use a wiped out buffer.
|
|
Problem: Vim9: finding global function without g: prefix but not finding
global variable is inconsistent.
Solution: Require using g: for a global function. Change the vim9.vim
script into a Vim9 script with exports. Fix that import in legacy
script does not work.
|
|
Problem: Cannot use script-local function for setting *func options.
Solution: Use the script context. (Yegappan Lakshmanan, closes #9362)
|
|
Problem: confusing error when using :cc without error list. (Gary Johnson)
Solution: Give the "no errors" error.
|
|
Problem: Setting *func options insufficiently tested.
Solution: Impove tests. (Yegappan Lakshmanan, closes #9337)
|
|
Problem: Lambda for option that is a function may be garbage collected.
Solution: Set a reference in the funcref. (Yegappan Lakshmanan,
closes #9330)
|
|
Problem: If the quickfix buffer is wiped out getqflist() still returns its
number.
Solution: Use zero if the buffer is no longer present. (Yegappan Lakshmanan,
closes #9306)
|
|
Problem: Quickfix buffer becomes hidden while still in a window.
Solution: Check if the closed window is the last window showing the quickfix
buffer. (Yegappan Lakshmanan, closes #9303, closes #9300)
|
|
Problem: MS-Windows: No error message if vimgrep pattern is not matching.
Solution: Give an error message. (Christian Brabandt, closes #9245,
closes #8762)
|
|
Problem: Typos in test files.
Solution: Correct the typos. (Dominique Pellé, closes #9175)
|
|
Problem: Opening the quickfix window triggers BufWinEnter twice. (Yorick
Peterse)
Solution: Only trigger BufWinEnter with "quickfix". (closes #9022)
|
|
Problem: win_gettype() does not recognize a quickfix window.
Solution: Add "quickfix" and "loclist". (Yegappan Lakshmanan, closes #8676)
|
|
Problem: Location list window may open a wrong file.
Solution: Also update the qf_ptr field. (Wei-Chung Wen, closes #8565,
closes #8566)
|
|
Problem: Not enough tests for quickfix end_col and end_lnum.
Solution: Add a few more test cases. (Shane-XB-Qian, closes #8409)
|
|
Problem: Location list only has the start position.
Solution: Make it possible to add an end position. (Shane-XB-Qian,
closes #8393)
|
|
Problem: Formatting using quickfixtextfunc is lost when updating location
lists for different buffers. (Yorick Peterse)
Solution: Use the right window for the locaiton list. (Yegappan Lakshmanan,
closes #8400, closes #8403)
|
|
Problem: Vim9: :cexpr does not work with local variables.
Solution: Compile :cexpr.
|
|
Problem: Cannot grep using fuzzy matching.
Solution: Add the "f" flag to :vimgrep. (Yegappan Lakshmanan, closes #8152)
|
|
Problem: Test may leave file behind.
Solution: Delete the temporary file. Don't profile in the running Vim
instance.
|
|
Problem: Vim9: cannot use Vim9 script syntax in some places.
Solution: Add the :vim9cmd command modifier. Incompatible: Makes ":vim9"
mean ":vim9cmd" instead of ":vim9script".
|
|
Problem: :vimgrep expands wildcards twice.
Solution: Do not expand wildcards a second time.
|