Problem: filetype: zone files are not recognized
(rpdprd)
Solution: Detect '*.zone' files as bindzone filetype
fixes: #14222
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: newline escape wrong in ex mode (Konrad Schwarz)
Solution: partly revert patch 7.3.014, remove backslash in front of a
newline when not in prompt mode in ex line mode
(Mohamed Akram)
This fixes newline escaping to allow passing multiple commands to
":global", multiple lines to shell commands, and ending lines in append
mode with backslashes. This should fix a POSIX/(traditional) VI
incompatiblity.
This reverts a previous incorrect attempt at patch v7.3.014 to fix
append mode which removed half of trailing backslashes which lead to,
eg. the following two commands being parsed as having a different number
of backslashes:
```
!echo foo\\\
```
```
!echo foo\\ \
```
fixes: #6135fixes: #7244closes: #15120
Signed-off-by: Mohamed Akram <mohd.akram@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Give priority to (placement) command modifiers, specifically
`:vertical`, `:horizontal` and `:tab`, ahead of `g:ft_man_open_mode`,
so that if the user says e.g. `:vert Man`, Vim does the expected thing.
closes: #15117
Signed-off-by: Ivan Shapovalov <intelfx@intelfx.name>
Signed-off-by: Christian Brabandt <cb@256bit.org>
If the user plays rebinding games such as
nnoremap : ,
nnoremap , :
(cf. https://konfekt.github.io/blog/2016/10/03/get-the-leader-right),
then the mappings defined by man.vim will become non-functional.
closes: #15130
Signed-off-by: Ivan Shapovalov <intelfx@intelfx.name>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: completion wrong with fuzzy when cycling back to original
(Quan Nguyen)
Solution: reset show_match_ok when cp_score is zero (glepnir)
fixes: #15095closes: #15105
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Track the cursor forward progress through a syntax test file
so that any degenerate input can be checked and reported.
closes: #15150
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Write a batch of test files with made-up syntax to serve for
additional linewise checks to be manually performed whenever
the algorithm for screen dump file generation is modified.
Define a shell variable VIM_SYNTAX_SELF_TESTING to run these
tests:
cd runtime/syntax/
VIM_SYNTAX_SELF_TESTING=1 make clean test
related: #15150
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
The current contents of sh_01_99.dump and sh_09_99.dump
begin with ":redraw" in the ruler line whereas both the
comment and the need for the redraw command execution imply
blanks " ".
related: #15150
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
The current implementation falls short for syntax test files
on two accounts:
1. With folded lines -- some lines before folded lines are
unnecessarily repeated in generated dump files because
closed folded lines are always treated as opened for the
cursor to move _in_ instead of to move _over_ them.
2. With wrapped lines (longer than 75 columns) -- some lines
are omitted in generated dump files because calculations
for the cursor progress and its movement commands only
refer to file lines and not their layout within a 20x75
buffer (less &cmdheight).
As an alternative, we abandon deterministic (and inaccurate
at times) calculations for the cursor progress and, instead,
advance the cursor by as much as before for a single dump
file, but now rely on marking the last visible line and
additional movement to position lines at desired offsets,
carefully preserving compatibility for the &scrolloff and
&ruler values inherited from defaults.vim. The parent Vim
process will keep track of progress through a syntax test
file made by its child process ("terminal") by reading the
rightmost end of the ruler line from the terminal buffer,
looking for " All " or " Bot " for its cue to finish dump
file generation.
With these changes applied, the lossless line length limit
will be raised from 75 to 1425 (for a 19x75 view) columns.
Also, prefer "lastline" to "truncate" for &display; hiding
the content of any last _long_ line in a view goes against
the purpose of syntax file testing -- all lines should be
recorded.
related: #15150fixes: #14245
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: resource leak in mch_get_random() (after v9.1.0518)
Solution: close file descriptor after reading successfully
from /dev/urandom
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: xxd: MSVC warning about non-ASCII character
Solution: Specify source-charset:utf-8 in Makefile (Ken Takata)
xxd.c has non-ASCII-character comments. This causes the following
warning on MSVC:
```
warning C4819: The file contains a character that cannot be represented
in the current code page (932). Save the file in Unicode format to
prevent data loss.
```
Add the `/source-charset:utf-8` option to avoid this.
closes: #15119
Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: silent! causes following try/catch to not work
(Malcolm Rowe)
Solution: consider emsg_silent in handle_did_throw() and do not abort
evaluation flow for :silent! (LemonBoy)
The silent! flag causes the evaluation not to be aborted in case of
uncaught exceptions, adjust handle_did_throw to take this detail into
account.
Fixes the long-standing todo.txt item:
```
Problem that a previous silent ":throw" causes a following try/catch not
to work. (ZyX, 2013 Sep 28) With examples: (Malcolm Rowe, 2015 Dec 24)
Also see #8487 for an example.
```
fixes: #538closes: #15128
Signed-off-by: LemonBoy <thatlemon@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: spell completion message still wrong in translations
(after 9.1.0512)
Solution: Update translation files with the new message
(Kyle Kovacs)
closes: #15113
Signed-off-by: Kyle Kovacs <kkovacs@diconfiberoptics.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: inconsistent parameter in Makefiles for Vim executable
Solution: consistently use $VIMPROG across all Makefiles
(RestorerZ)
closes: #15099
Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Cursor is moved to bottom of window trying to pagescroll when
already at the start of the buffer (Asheq Imran, after v9.1.0357)
Solution: Don't move cursor when buffer content did not move.
(Luuk van Baal)
closes: #15139
Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This makes it more consistent with :h vimrc and is more correct (in the
case when $XDG_CONFIG_HOME has been defined to point to some other
location.
fixes: #15108
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Right release selects immediately when pum is truncated.
Solution: Use pum_height instead of pum_size when checking click row.
Don't place it above mouse row when there is more space below.
(zeertzjq)
fixes: #15101closes: #15102
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: the recursive parameter in the *_equal functions can be removed
Solution: Remove the recursive parameter in dict_equal(), list_equal()
object_equal and tv_equal(). Use a comparison of the static
var recursive_cnt == 0 to determine whether or not tv_equal()
has been called recursively (Yinzuo Jiang).
closes: #15070
Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim9: cannot downcast an object (Ernie Rael)
Solution: Fix class downcasting issue (LemonBoy).
When casting an object from one class to another the target type may be
a subclass (downcast) or superclass (upcast) of the source one.
Upcasts require a runtime type check to be emitted.
Add a disassembly test.
fixes: #13244closes: #15079
Signed-off-by: LemonBoy <thatlemon@gmail.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim9: string(object) hangs for recursive references
Solution: Handle recursive objects specifically, add a hang test and a
compare test (Ernie Rael)
fixes: #15080closes: #15082
Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: MS-Windows: libvterm compilation can be optimized
Solution: Enable batch inference for libvterm (Ken Takata)
Enable batch inference for libvterm by using $(OBJDIR)/libvterm as the
object directory. This should make the compilation process a bit faster.
closes: #15118
Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: initialize the random buffer can be improved
Solution: refactor init_srand() function, move machine-specific parts to
os_mswin and os_unix, implement a fallback for Windows 10 and
later (LemonBoy)
closes: #15125
Signed-off-by: LemonBoy <thatlemon@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: MS-Windows: too long lines in Make_mvc.mak
Solution: Wrap long lines in Make_mvc.mak (Ken Takata)
closes: #15133
Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
- Functions are way too long. Readability and maintainability should
be slightly improved.
- Some variables are re-assigned to their initial value at teardown.
This should not be needed since all internal variables are
re-initialized at startup of every Termdebug session.
closes: #15086
Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
With the variables defined, distinctly highlight parts of
a method declaration header: its name and parameter list
parens, from its type parameters, return type, and formal
parameters; and distinctly highlight parts of a lambda
expression: its parameter list parens and the arrow, from
its formal parameters and identifiers.
closes: #15083
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: need more tests for nested dicts and list comparision
Solution: Add tests for comparing deeply nested List/Dict values
(Yegappan Lakshmanan)
closes: #15081
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim9: segfault in object_equal()
Solution: test for object pointer being NULL, before dereferencing them
(Ernie Rael)
closes: #15085
Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Vim9: issue with comparing objects recursively
(Yinzuo Jiang)
Solution: only set recursive == TRUE, when called from tv_equal(), not
from typeval_compare_object(), refactor code into object_equal()
function (LemonBoy)
The recursive flag in tv_equal should be set only when the caller is
tv_equal, meaning that the comparison depth is > 1. The comparison
predicates for other object types are all following this rule, except
for the object one, and that may cause some weird issues like causing
the max depth limit not to be initialized in some cases.
closes: #15076
Signed-off-by: LemonBoy <thatlemon@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: The types of some script variables in Termdebug
can be changed for readability
Solution: Change the type of some vars from string to `enum`
(Yinzuo Jiang)
closes: #15068
Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Match Vim9-script comments after :def and :enddef and legacy-script
comments after :func and :endfunc, in any definition context.
Highlight incorrect comment types after these commands as errors.
fixes: #15062closes: #15072
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Mode message for spell completion doesn't match allowed keys
(Kyle Kovacs)
Solution: Show "^S" instead of "s".
(zeertzjq)
This matches the code in vim_is_ctrl_x_key():
case CTRL_X_SPELL:
return (c == Ctrl_S || c == Ctrl_P || c == Ctrl_N);
fixes: neovim/neovim#29431
closes: #15065
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>