summaryrefslogtreecommitdiffstats
path: root/src/ex_docmd.c
AgeCommit message (Collapse)Author
2024-03-31patch 9.1.0231: Filetype may be undetected when SwapExists sets ft in other bufv9.1.0231zeertzjq
Problem: Filetype may be undetected when a SwapExists autocommand sets filetype in another buffer. Solution: Make filetype detection state buffer-specific. Also fix a similar problem for 'modified' (zeertzjq). closes: #14344 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-26patch 9.1.0208: winfixbuf does not allow to re-edit current bufferv9.1.0208Colin Kennedy
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>
2024-03-25patch 9.1.0205: Cannot use modifiers before :-Ntabmovev9.1.0205zeertzjq
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>
2024-03-03patch 9.1.0147: Cannot keep a buffer focused in a windowv9.1.0147Colin Kennedy
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>
2024-01-04patch 9.1.0006: is*() and to*() function may be unsafev9.1.0006Keith Thompson
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>
2023-12-19patch 9.0.2180: POSIX function name in exarg causes issuesv9.0.2180Zoltan Arpadffy
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>
2023-11-16patch 9.0.2110: [security]: overflow in ex address parsingv9.0.2110Christian Brabandt
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>
2023-10-17patch 9.0.2037: A few remaining cmdline completion issues with C-E/Yv9.0.2037Yee Cheng Chin
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>
2023-10-14patch 9.0.2025: no cmdline completion for ++opt argsv9.0.2025Yee Cheng Chin
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>
2023-09-05patch 9.0.1876: Vim9: parsing commands with newlines wrongv9.0.1876Christian Brabandt
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>
2023-09-02patch 9.0.1846: [security] crash in fullcommandv9.0.1846Christian Brabandt
Problem: crash in fullcommand Solution: Check for typeval correctly Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-27patch 9.0.1806: Vim9: bogus error on exportv9.0.1806LemonBoy
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>
2023-06-25patch 9.0.1665: empty CmdlineEnter autocommand causes errors in Ex modev9.0.1665Christian Brabandt
Problem: Empty CmdlineEnter autocommand causes errors in Ex mode. Solution: Save and restore ex_pressedreturn. (Christian Brabandt, closes # 12581, closes #12578)
2023-05-31patch 9.0.1594: some internal error messages are translatedv9.0.1594RestorerZ
Problem: Some internal error messages are translated. Solution: Consistently do not translate internal error messages. (closes #12459)
2023-05-24patch 9.0.1576: users may not know what to do with an internal errorv9.0.1576Bram Moolenaar
Problem: Users may not know what to do with an internal error. Solution: Add a translated message with instructions.
2023-05-20patch 9.0.1571: RedrawingDisabled not used consistentlyv9.0.1571Bram Moolenaar
Problem: RedrawingDisabled not used consistently. Solution: Avoid RedrawingDisabled going negative. Set RedrawingDisabled in win_split_ins(). (closes #11961)
2023-05-10patch 9.0.1538: :wqall does not trigger ExitPrev9.0.1538Bram Moolenaar
Problem: :wqall does not trigger ExitPre. (Bart Libert) Solution: Move preparations for :qall to a common function. (closes #12374)
2023-05-05patch 9.0.1510: misleading variable name for error messagev9.0.1510Bram Moolenaar
Problem: Misleading variable name for error message. Solution: Change "name" to "number". (closes #12345)
2023-04-15patch 9.0.1454: code indenting is confused by macrosv9.0.1454ichizok
Problem: Code indenting is confused by macros. Solution: Put semicolon after the macros instead of inside. (Ozaki Kiichi, closes #12257)
2023-03-12patch 9.0.1403: unused variables and functionsv9.0.1403Dominique Pelle
Problem: Unused variables and functions. Solution: Delete items and adjust #ifdefs. (Dominique Pellé, closes #12145)
2023-03-11patch 9.0.1400: find_file_in_path() is not reentrantv9.0.1400Bram Moolenaar
Problem: find_file_in_path() is not reentrant. Solution: Instead of global variables pass pointers to the functions. (closes #12093)
2023-02-21patch 9.0.1336: functions without arguments are not always declared properlyv9.0.1336Yegappan Lakshmanan
Problem: Functions without arguments are not always declared properly. Solution: Use "(void)" instead of "()". (Yegappan Lakshmanan, closes #12031)
2023-02-20patch 9.0.1330: handling new value of an option has a long "else if" chainv9.0.1330Yegappan Lakshmanan
Problem: Handling new value of an option has a long "else if" chain. Solution: Use a function pointer. (Yegappan Lakshmanan, closes #12015)
2023-01-17patch 9.0.1215: using isalpha() adds dependency on current localev9.0.1215zeertzjq
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)
2023-01-05patch 9.0.1150: :interface is not implemented yetv9.0.1150Bram Moolenaar
Problem: :interface is not implemented yet. Solution: Implement the basics of :interface.
2023-01-02patch 9.0.1132: code is indented more than neededv9.0.1132Yegappan Lakshmanan
Problem: Code is indented more than needed. Solution: Use an early return to reduce indentation. (Yegappan Lakshmanan, closes #11769)
2022-12-30patch 9.0.1115: code is indented more than neededv9.0.1115Yegappan Lakshmanan
Problem: Code is indented more than needed. Solution: Use an early return to reduce indenting. (Yegappan Lakshmanan, closes #11758)
2022-12-04patch 9.0.1001: classes are not documented or implemented yetv9.0.1001Bram Moolenaar
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.
2022-11-28patch 9.0.0965: using one window for executing autocommands is insufficientv9.0.0965Bram Moolenaar
Problem: Using one window for executing autocommands is insufficient. Solution: Use up to five windows for executing autocommands.
2022-11-19patch 9.0.0909: error message for layout change does not match actionv9.0.0909Bram Moolenaar
Problem: Error message for layout change does not match action. Solution: Pass the command to where the error is given. (closes #11573)
2022-11-19patch 9.0.0907: restoring window after WinScrolled may failv9.0.0907Bram Moolenaar
Problem: Restoring window after WinScrolled may fail. Solution: Lock the window layout when triggering WinScrolled.
2022-11-11patch 9.0.0861: solution for "!!sort" in closed fold is not optimalv9.0.0861Bram Moolenaar
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)
2022-11-11patch 9.0.0859: compiler warning for unused variablev9.0.0859Bram Moolenaar
Problem: Compiler warning for unused variable. Solution: Add #ifdef.
2022-11-11patch 9.0.0858: "!!sort" in a closed fold sorts too many linesv9.0.0858Bram Moolenaar
Problem: "!!sort" in a closed fold sorts too many lines. Solution: Round to end of fold after adding the line count. (closes #11487)
2022-10-09patch 9.0.0708: :confirm does not work properly for a terminal bufferv9.0.0708Yee Cheng Chin
Problem: :confirm does not work properly for a terminal buffer. Solution: Handle :confirm for a terminal buffer differently. (Yee Cheng Chin, closes #11312)
2022-10-07patch 9.0.0688: debugger does not display the whole commandv9.0.0688Bram Moolenaar
Problem: Debugger does not display the whole command. Solution: Set ea.cmd before checking for a breakpoint.
2022-10-07patch 9.0.0687: "export def" does not work in a nested blockv9.0.0687Bram Moolenaar
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)
2022-10-04patch 9.0.0657: too many #ifdefsv9.0.0657Martin Tournoij
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)
2022-10-02patch 9.0.0637: syntax of commands in Vim9 script depends on +eval featurev9.0.0637Bram Moolenaar
Problem: Syntax of commands in Vim9 script depends on +eval feature. Solution: Use same syntax with and without the +eval feature.
2022-10-01patch 9.0.0634: evaluating "expr" options has more overhead than neededv9.0.0634Bram Moolenaar
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'.
2022-09-22patch 9.0.0550: crash when closing a tabpage and buffer is NULLv9.0.0550zeertzjq
Problem: Crash when closing a tabpage and buffer is NULL. Solution: Adjust how autocommands are triggered when closing a window. (closes #11198, closes #11197)
2022-09-20patch 9.0.0517: when at the command line :redrawstatus does not work wellv9.0.0517zeertzjq
Problem: When at the command line :redrawstatus does not work well. Solution: Only update the statuslines instead of the screen. (closes #11180)
2022-09-20patch 9.0.0512: cannot redraw the status lines when editing a commandv9.0.0512zeertzjq
Problem: Cannot redraw the status lines when editing a command. Solution: Only postpone the redraw when messages have scrolled. (closes #11170)
2022-09-19patch 9.0.0507: cmdline cleared when using :redrawstatus in CmdlineChangedv9.0.0507Bram Moolenaar
Problem: Command line cleared when using :redrawstatus in CmdlineChanged autocommand event. Solution: Postpone the redraw. (closes #11162)
2022-09-15patch 9.0.0473: fullcommand() only works for the current script versionv9.0.0473Bram Moolenaar
Problem: fullcommand() only works for the current script version. Solution: Add an optional argument for the script version.
2022-09-11patch 9.0.0444: trying to declare g:variable gives confusing errorv9.0.0444Bram Moolenaar
Problem: Trying to declare g:variable gives confusing error. Solution: Give a better error message. (closes #11108)
2022-09-09patch 9.0.0423: "for" and "while" not recognized after :vim9cmd and :legacyv9.0.0423Bram Moolenaar
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.
2022-09-02patch 9.0.0360: crash when invalid line number on :for is ignoredv9.0.0360Bram Moolenaar
Problem: Crash when invalid line number on :for is ignored. Solution: Do not check breakpoint for non-existing line.
2022-09-01patch 9.0.0350: :echowindow does not work in a compiled functionv9.0.0350Bram Moolenaar
Problem: :echowindow does not work in a compiled function. Solution: Handle the expression at compile time.
2022-09-01patch 9.0.0346: :horizontal modifier not fully supportedv9.0.0346zeertzjq
Problem: :horizontal modifier not fully supported. Solution: Also use :horizontal for completion and user commands. (closes #11025)