Age | Commit message (Collapse) | Author |
|
Problem: winfixbuf does not allow to re-edit current buffer
(Tim Pope, after v9.1.0147)
Solution: Explicitly allow :e even when 'winfixbuf' is set,
since it just re-loads the current buffer
(Colin Kennedy)
fixes: #14237
closes: #14286
Signed-off-by: Colin Kennedy <colinvfx@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: Cannot use modifiers before :-Ntabmove.
Solution: Check backwards from the command instead of checking from the
start of the command line. Slightly adjust docs to make them
more consistent (zeertzjq).
closes: #14289
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: Cannot keep a buffer focused in a window
(Amit Levy)
Solution: Add the 'winfixbuf' window-local option
(Colin Kennedy)
fixes: #6445
closes: #13903
Signed-off-by: Colin Kennedy <colinvfx@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: is*() and to*() function may be unsafe
Solution: Add SAFE_* macros and start using those instead
(Keith Thompson)
Use SAFE_() macros for is*() and to*() functions
The standard is*() and to*() functions declared in <ctype.h> have
undefined behavior for negative arguments other than EOF. If plain char
is signed, passing an unchecked value from argv for from user input
to one of these functions has undefined behavior.
Solution: Add SAFE_*() macros that cast the argument to unsigned char.
Most implementations behave sanely for negative arguments, and most
character values in practice are non-negative, but it's still best
to avoid undefined behavior.
The change from #13347 has been omitted, as this has already been
separately fixed in commit ac709e2fc0db6d31abb7da96f743c40956b60c3a
(v9.0.2054)
fixes: #13332
closes: #13347
Signed-off-by: Keith Thompson <Keith.S.Thompson@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: POSIX function name in exarg struct causes issues
on OpenVMS
Solution: Rename getline member in exarg struct to ea_getline,
remove isinf() workaround for VMS
There are compilers that do not treat well POSIX functions - like
getline - usage in the structs.
Older VMS compilers could digest this... but the newer OpenVMS compilers
( like VSI C x86-64 X7.4-843 (GEM 50XB9) ) cannot deal with these
structs. This could be limited to getline() that is defined via
getdelim() and might not affect all POSIX functions in general - but
avoiding POSIX function names usage in the structs is a "safe side"
practice without compromising the functionality or the code readability.
The previous OpenVMS X86 port used a workaround limiting the compiler
capabilities using __CRTL_VER_OVERRIDE=80400000
In order to make the OpenVMS port future proof, this pull request
proposes a possible solution.
closes: #13704
Signed-off-by: Zoltan Arpadffy <zoltan.arpadffy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: [security]: overflow in ex address parsing
Solution: Verify that lnum is positive, before substracting from
LONG_MAX
[security]: overflow in ex address parsing
When parsing relative ex addresses one may unintentionally cause an
overflow (because LONG_MAX - lnum will overflow for negative addresses).
So verify that lnum is actually positive before doing the overflow
check.
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: A few remaining cmdline completion issues with C-E/Y
Solution: Fix cmdline completion fuzzy/Ctrl-E/Ctrl-Y/options when not
used at the end
Fix cmdline completion fuzzy/Ctrl-E/Ctrl-Y/options when not used at the end
A few places in the cmdline completion code only works properly when the
user hits Tab (or 'wildchar') at the end of the cmdline, even though
it's supposed to work even in the middle of the line.
For fuzzy search, `:e ++ff`, and `:set hl=`, fix completion code to make
sure to use `xp_pattern_len` instead of assuming the entire `xp_pattern`
is the search pattern (since it contains texts after the cursor).
Fix Ctrl-E / Ctrl-Y to not jump to the end when canceling/accepting a
wildmenu completion. Also, make them work even when not using
`set wildoptions+=pum` as there is no drawback to doing so.
(Related issue where this was brought up: #13331)
closes: #13362
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
|
|
Problem: no cmdline completion for ++opt args
Solution: Add cmdline completion for :e ++opt=arg and :terminal
[++options]
closes: #13319
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
|
|
Problem: Vim9: parsing commands with newlines wrong
Solution: Accept a '\n' for parsing lists and command arguments
closes: #13015
closes: #13020
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: crash in fullcommand
Solution: Check for typeval correctly
Signed-off-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: Vim9: bogus error on export
Solution: Don't error out when the export command is not executed
closes: #12912
closes: #12930
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: LemonBoy <thatlemon@gmail.com>
|
|
Problem: Empty CmdlineEnter autocommand causes errors in Ex mode.
Solution: Save and restore ex_pressedreturn. (Christian Brabandt,
closes # 12581, closes #12578)
|
|
Problem: Some internal error messages are translated.
Solution: Consistently do not translate internal error messages.
(closes #12459)
|
|
Problem: Users may not know what to do with an internal error.
Solution: Add a translated message with instructions.
|
|
Problem: RedrawingDisabled not used consistently.
Solution: Avoid RedrawingDisabled going negative. Set RedrawingDisabled in
win_split_ins(). (closes #11961)
|
|
Problem: :wqall does not trigger ExitPre. (Bart Libert)
Solution: Move preparations for :qall to a common function. (closes #12374)
|
|
Problem: Misleading variable name for error message.
Solution: Change "name" to "number". (closes #12345)
|
|
Problem: Code indenting is confused by macros.
Solution: Put semicolon after the macros instead of inside. (Ozaki Kiichi,
closes #12257)
|
|
Problem: Unused variables and functions.
Solution: Delete items and adjust #ifdefs. (Dominique Pellé, closes #12145)
|
|
Problem: find_file_in_path() is not reentrant.
Solution: Instead of global variables pass pointers to the functions.
(closes #12093)
|
|
Problem: Functions without arguments are not always declared properly.
Solution: Use "(void)" instead of "()". (Yegappan Lakshmanan, closes #12031)
|
|
Problem: Handling new value of an option has a long "else if" chain.
Solution: Use a function pointer. (Yegappan Lakshmanan, closes #12015)
|
|
Problem: Using isalpha() adds dependency on current locale.
Solution: Do not use isalpha() for recognizing a URL or the end of an Ex
command. (closes #11835)
|
|
Problem: :interface is not implemented yet.
Solution: Implement the basics of :interface.
|
|
Problem: Code is indented more than needed.
Solution: Use an early return to reduce indentation. (Yegappan Lakshmanan,
closes #11769)
|
|
Problem: Code is indented more than needed.
Solution: Use an early return to reduce indenting. (Yegappan Lakshmanan,
closes #11758)
|
|
Problem: Classes are not documented or implemented yet.
Solution: Make the first steps at documenting Vim9 objects, classes and
interfaces. Make initial choices for the syntax. Add a skeleton
implementation. Add "public" and "this" in the command table.
|
|
Problem: Using one window for executing autocommands is insufficient.
Solution: Use up to five windows for executing autocommands.
|
|
Problem: Error message for layout change does not match action.
Solution: Pass the command to where the error is given. (closes #11573)
|
|
Problem: Restoring window after WinScrolled may fail.
Solution: Lock the window layout when triggering WinScrolled.
|
|
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 #11487)
|
|
Problem: Compiler warning for unused variable.
Solution: Add #ifdef.
|
|
Problem: "!!sort" in a closed fold sorts too many lines.
Solution: Round to end of fold after adding the line count. (closes #11487)
|
|
Problem: :confirm does not work properly for a terminal buffer.
Solution: Handle :confirm for a terminal buffer differently. (Yee Cheng
Chin, closes #11312)
|
|
Problem: Debugger does not display the whole command.
Solution: Set ea.cmd before checking for a breakpoint.
|
|
Problem: "export def" does not work in a nested block.
Solution: Do not handle "export" with a separate function but in the same
command stack. (closes #11304)
|
|
Problem: Too many #ifdefs.
Solution: Graduate the +cmdwin feature. Now the tiny and small builds are
equal, drop the small build. (Martin Tournoij, closes #11268)
|
|
Problem: Syntax of commands in Vim9 script depends on +eval feature.
Solution: Use same syntax with and without the +eval feature.
|
|
Problem: Evaluating "expr" options has more overhead than needed.
Solution: Use call_simple_func() for 'foldtext', 'includeexpr', 'printexpr',
"expr" of 'spellsuggest', 'diffexpr', 'patchexpr', 'balloonexpr',
'formatexpr', 'indentexpr' and 'charconvert'.
|
|
Problem: Crash when closing a tabpage and buffer is NULL.
Solution: Adjust how autocommands are triggered when closing a window.
(closes #11198, closes #11197)
|
|
Problem: When at the command line :redrawstatus does not work well.
Solution: Only update the statuslines instead of the screen. (closes #11180)
|
|
Problem: Cannot redraw the status lines when editing a command.
Solution: Only postpone the redraw when messages have scrolled.
(closes #11170)
|
|
Problem: Command line cleared when using :redrawstatus in CmdlineChanged
autocommand event.
Solution: Postpone the redraw. (closes #11162)
|
|
Problem: fullcommand() only works for the current script version.
Solution: Add an optional argument for the script version.
|
|
Problem: Trying to declare g:variable gives confusing error.
Solution: Give a better error message. (closes #11108)
|
|
Problem: "for" and "while" not recognized after :vim9cmd and :legacy.
(Emanuele Torre)
Solution: Recognize all the command modifiers. (closes #11087)
Add a test to check the list of modifiers.
|
|
Problem: Crash when invalid line number on :for is ignored.
Solution: Do not check breakpoint for non-existing line.
|
|
Problem: :echowindow does not work in a compiled function.
Solution: Handle the expression at compile time.
|
|
Problem: :horizontal modifier not fully supported.
Solution: Also use :horizontal for completion and user commands.
(closes #11025)
|
|
Problem: ":wincmd =" equalizes in two directions.
Solution: Make ":vertical wincmd =" equalize vertically only and
":horizontal wincmd =" equalize horizontally only.
|