1
0
forked from aniani/vim

242 Commits

Author SHA1 Message Date
64-bitman
250739d442
patch 9.1.1213: cannot :put while keeping indent
Problem:  cannot :put while keeping indent
          (Peter Aronoff)
Solution: add the :iput ex command (64-bitman)

fixes: #16225
closes: #16886

Signed-off-by: 64-bitman <60551350+64-bitman@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-16 21:15:11 +01:00
h-east
aa979c763d
patch 9.1.0985: Vim9: some ex commands can be shortened
Problem:  Vim9: some ex commands can be shortened
Solution: disallow shortening of :abstract, :interface and :type
          (h-east)

closes: #16356

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-03 10:19:45 +01:00
h-east
b7f19a5459
patch 9.1.0966: Vim9: :enum command can be shortened
Problem:  Vim9: :enum command can be shortened
Solution: prevent shortening of :enum command by adding the EX_WHOLE
          flag to command definition (h-east)

closes: #16305

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-27 16:25:32 +01:00
Yinzuo Jiang
a2a2fe841e
patch 9.1.0934: hard to view an existing buffer in the preview window
Problem:  hard to view an existing buffer in the preview window
Solution: add the :pbuffer command (Yinzuo Jiang)

Similar as `:pedit` and `:buffer` command. `:pbuffer` edits buffer [N]
from the buffer list in the preview window.

`:pbuffer` can also open special buffer, for example terminal buffer.

closes: #16222

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-16 21:22:09 +01:00
Christian Brabandt
652c821366
patch 9.1.0381: cbuffer and similar commands don't accept a range
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>
2024-04-29 20:36:49 +02:00
Yegappan Lakshmanan
ac7731895c
patch 9.1.0376: Vim9: Trailing commands after class/enum keywords ignored
Problem:  Vim9: Trailing commands after class/enum keywords ignored
Solution: Remove EX_TRLBAR keyword from command definition
          (Yegappan Lakshmanan)

closes: #14649

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-27 11:48:26 +02:00
John Marriott
ed908f760d
patch 9.1.0352: Finding cmd modifiers and cmdline-specials is inefficient
Problem:  Finding cmd modifiers and cmdline-specials is inefficient
Solution: Use binary search to find ex command modifiers and
          cmdline-special characters and reduce the number of strlen()
          (John Marriott)

closes: #14534

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-18 22:46:56 +02:00
Yegappan Lakshmanan
3164cf8f12
patch 9.1.0219: Vim9: No enum support
Problem:  No enum support
Solution: Implement enums for Vim9 script
          (Yegappan Lakshmanan)

closes: #14224

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-28 10:38:28 +01:00
Colin Kennedy
2157035637
patch 9.1.0147: Cannot keep a buffer focused in a window
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-03-03 16:16:47 +01:00
Zoltan Arpadffy
6fdb628082
patch 9.0.2180: POSIX function name in exarg causes issues
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-12-19 20:53:07 +01:00
Julio B
eb43b7f053 patch 9.0.1596: :registers command does not work in sandbox
Problem:    :registers command does not work in sandbox.
Solution:   Add flag to the command. (closes #12473)
2023-06-01 12:45:22 +01:00
Bram Moolenaar
657aea7fc4 patch 9.0.1249: cannot export an abstract class
Problem:    Cannot export an abstract class. (Ernie Rael)
Solution:   Add the EX_EXPORT flag to :abstract. (closes #11884)
2023-01-27 13:16:19 +00:00
Bram Moolenaar
53f54e49b7 patch 9.0.1248: cannot export an interface
Problem:    Cannot export an interface. (Ernie Rael)
Solution:   Add the EX_EXPORT flag to :interface. (closes #11884)
2023-01-26 20:36:56 +00:00
Bram Moolenaar
ebfec1c531 patch 9.0.1234: the code style has to be checked manually
Problem:    The code style has to be checked manually.
Solution:   Add basic code style checks in a test.  Fix or avoid uncovered
            problems.
2023-01-22 21:14:53 +00:00
Bram Moolenaar
554d031302 patch 9.0.1150: :interface is not implemented yet
Problem:    :interface is not implemented yet.
Solution:   Implement the basics of :interface.
2023-01-05 19:59:18 +00:00
Bram Moolenaar
c1c365c1ca patch 9.0.1001: classes are not documented or implemented yet
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-12-04 20:13:24 +00:00
Bram Moolenaar
5ab300195b patch 9.0.0687: "export def" does not work in a nested block
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-07 17:26:22 +01:00
Bram Moolenaar
bdc09a18fc patch 9.0.0683: cannot specify a time for :echowindow
Problem:    Cannot specify a time for :echowindow.
Solution:   A count can be used to specify the display time. Add
            popup_findecho().
2022-10-07 14:31:45 +01:00
Bram Moolenaar
1d84f7608f patch 9.0.0370: cleaning up afterwards can make a function messy
Problem:    Cleaning up afterwards can make a function messy.
Solution:   Add the :defer command.
2022-09-03 21:35:53 +01:00
Bram Moolenaar
21c3a80a7f patch 9.0.0342: ":wincmd =" equalizes in two directions
Problem:    ":wincmd =" equalizes in two directions.
Solution:   Make ":vertical wincmd =" equalize vertically only and
            ":horizontal wincmd =" equalize horizontally only.
2022-08-31 17:49:14 +01:00
Bram Moolenaar
37fef16c22 patch 9.0.0321: cannot use the message popup window directly
Problem:    Cannot use the message popup window directly.
Solution:   Add ":echowindow".
2022-08-29 18:16:32 +01:00
Bram Moolenaar
f79d9dd43f patch 8.2.4989: cannot specify a function name for :defcompile
Problem:    Cannot specify a function name for :defcompile.
Solution:   Implement a function name argument for :defcompile.
2022-05-21 15:39:02 +01:00
Yegappan Lakshmanan
454ce6737c patch 8.2.4617: no completion for :scriptnames
Problem:    No completion for :scriptnames.
Solution:   Implement :scriptnames completion. (Yegappan Lakshmanan,
            closes #10005)
2022-03-24 11:22:13 +00:00
Yegappan Lakshmanan
36a5b6867b patch 8.2.4594: need to write script to a file to be able to source them
Problem:    Need to write script to a file to be able to source them.
Solution:   Make ":source" use lines from the current buffer. (Yegappan
            Lakshmanan et al., closes #9967)
2022-03-19 12:56:51 +00:00
Bram Moolenaar
d523c7be5c patch 8.2.4519: Vim9: Can still use ":fini" and ":finis" for ":finish"
Problem:    Vim9: Can still use ":fini" and ":finis" for ":finish".
Solution:   Require using ":finish".
2022-03-06 14:51:22 +00:00
Bram Moolenaar
b2175220da patch 8.2.4514: Vim9: some flow commands can be shortened
Problem:    Vim9: some flow commands can be shortened.
Solution:   Also require using the full name for ":return", ":enddef",
            ":continue", ":export" and ":import".
2022-03-05 20:24:41 +00:00
Bram Moolenaar
204852ae2a patch 8.2.4510: Vim9: shortening commands leads to confusing script
Problem:    Vim9: shortening commands leads to confusing script.
Solution:   In Vim9 script require at least ":cont" for ":continue", "const"
            instead of "cons", "break" instead of "brea", "catch" instead of
            "cat", "else" instead of "el" "elseif" instead of "elsei" "endfor"
            instead of "endfo" "endif" instead of "en" "endtry" instead of
            "endt", "finally" instead of "fina", "throw" instead of "th",
            "while" instead of "wh".
2022-03-05 12:56:44 +00:00
Nir Lichtman
73a024209c patch 8.2.3888: the argument list may contain duplicates
Problem:    The argument list may contain duplicates.
Solution:   Add the :argdedeupe command. (Nir Lichtman, closes #6235)
2021-12-24 20:28:03 +00:00
Bram Moolenaar
259f443a93 patch 8.2.3835: the inline-function example does not work
Problem:    The inline-function example does not work.
Solution:   Drop ":let".  Add EX_EXPR_ARG to CMD_var. (issue #9352)
2021-12-17 12:45:22 +00:00
Bram Moolenaar
f87dac04c3 patch 8.2.3817: Vim9: Not using NL as command end does not work for :autocmd
Problem:    Vim9: Not using NL as command end does not work for :autocmd.
Solution:   Only ignore NL for commands with an expression argument.
2021-12-15 17:53:40 +00:00
Bram Moolenaar
279d733dfb patch 8.2.3683: Vim9: cannot use in :...do commands
Problem:    Vim9: cannot use  in :...do commands.
Solution:   Add EX_EXPAND to the commands. (closes #9232)
2021-11-27 11:42:50 +00:00
Bram Moolenaar
58ef8a31d7 patch 8.2.3584: "verbose set efm" reports location of the :compiler command
Problem:    "verbose set efm" reports the location of the :compiler command.
            (Gary Johnson)
Solution:   Add the "-keepscript" argument to :command and use it when
            defining CompilerSet.
2021-11-12 11:25:11 +00:00
Dominique Pelle
7f2dd1e90c patch 8.2.3400: ":z!" is not supported
Problem:    ":z!" is not supported.
Solution:   Make ":z!" work and add tests. (Dominique Pellé, closes #8836)
            Use display height instead of current window height.
2021-09-04 13:44:01 +02:00
Bram Moolenaar
2c70711e3f patch 8.2.3279: Vim9: cannot use block in cmdline window
Problem:    Vim9: cannot use block in cmdline window.
Solution:   Add EX_CMDWIN to the CMD_block flags. (closes #8689)
2021-08-02 22:26:56 +02:00
Bram Moolenaar
ff34bee3a2 patch 8.2.3223: Vim: using {} block in autoloade omnifunc fails
Problem:    Vim: using {} block in autoloade omnifunc fails.
Solution:   Allow using {} block when text is locked. (closes #8631)
2021-07-25 20:27:06 +02:00
Bram Moolenaar
f3d30842dc patch 8.2.3047: increment and decrement don't allow for next command
Problem:    Increment and decrement don't allow for next command.
Solution:   Allow for comment and next command. (closes #8442)
2021-06-25 19:29:30 +02:00
Bram Moolenaar
7423577180 patch 8.2.2982: Vim9: future commands are not reserved yet
Problem:    Vim9: future commands are not reserved yet.
Solution:   Add commands to be implemented later.  Make "this" a reserved
            name.
2021-06-12 14:53:05 +02:00
Bram Moolenaar
f05d2fc539 patch 8.2.2956: Vim9: need to plan for future additions
Problem:    Vim9: need to plan for future additions.
Solution:   Reserve commands for future use: :type, :class, :enum.
2021-06-06 22:02:16 +02:00
Bram Moolenaar
bdc0f1c698 patch 8.2.2806: Vim9: using "++nr" as a command might not work
Problem:    Vim9: using "++nr" as a command might not work.
Solution:   Do not recognize "++" and "--" in a following line as addition or
            subtraction.
2021-04-24 19:08:24 +02:00
Bram Moolenaar
96cf4ba8fb patch 8.2.2805: Vim9: cannot use legacy syntax in Vim9 script
Problem:    Vim9: cannot use legacy syntax in Vim9 script.
Solution:   Add the :legacy command.
2021-04-24 14:15:41 +02:00
Bram Moolenaar
4c86830fc5 patch 8.2.2638: cannot write a message to the terminal from the GUI
Problem:    Cannot write a message to the terminal from the GUI.
Solution:   Add :echoconsole and use it in the test runner. (issue #7975)
2021-03-22 16:19:45 +01:00
Bram Moolenaar
0abc6e471a patch 8.2.2553: Vim9: Cannot put "|" after "{"
Problem:    Vim9: Cannot put "|" after "{".
Solution:   Add the EX_TRLBAR flag. (issue #7904)
2021-02-26 22:21:23 +01:00
Bram Moolenaar
9f646c2e11 patch 8.2.2552: Vim9: no reason to consider "{{{{{{{{" a command
Problem:    Vim9: no reason to consider "{{{{{{{{" a command.
Solution:   Just use "{". (issue #7904)
2021-02-26 21:56:47 +01:00
Bram Moolenaar
10b9421f3b patch 8.2.2531: Vim9: the :k command is obscure
Problem:    Vim9: the :k command is obscure.
Solution:   Disallow using :k, can use :mark instead. (closes #7874)
2021-02-19 21:42:57 +01:00
Bram Moolenaar
39f3b14110 patch 8.2.2511: Vim9: cannot use Vim9 script syntax in some places
Problem:    Vim9: cannot use Vim9 script syntax in some places.
Solution:   Add the :vim9cmd command modifier. Incompatible: Makes ":vim9"
            mean ":vim9cmd" instead of ":vim9script".
2021-02-14 12:57:36 +01:00
Bram Moolenaar
b204990346 patch 8.2.2400: Vim9: compiled functions are not profiled
Problem:    Vim9: compiled functions are not profiled.
Solution:   Add initial changes to profile compiled functions.  Fix that a
            script-local function was hard to debug.
2021-01-24 12:53:53 +01:00
Bram Moolenaar
e2edc2ed4a patch 8.2.2366: when using ":sleep" the cursor is always displayed
Problem:    When using ":sleep" the cursor is always displayed.
Solution:   Do not display the cursor when using ":sleep!". (Jeremy Lerner,
            closes #7688)
2021-01-16 20:21:23 +01:00
Bram Moolenaar
2b32700dab patch 8.2.2222: Vim9: cannot keep script variables when reloading
Problem:    Vim9: cannot keep script variables when reloading.
Solution:   Add the "noclear" argument to :vim9script.
2020-12-26 15:39:31 +01:00
Bram Moolenaar
f4e2099e39 patch 8.2.2182: Vim9: value of 'magic' is still relevant
Problem:    Vim9: value of 'magic' is still relevant.
Solution:   Always behave like 'magic' is on in Vim9 script (closes #7509)
2020-12-21 19:59:08 +01:00
Bram Moolenaar
b5b9480ee9 patch 8.2.2138: Vim9: "exit_cb" causes Vim to exit
Problem:    Vim9: "exit_cb" causes Vim to exit.
Solution:   Require white space after a command in Vim9 script. (closes #7467)
            Also fix that Vim9 style heredoc was not always recognized.
2020-12-13 17:50:20 +01:00