aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds.c
Commit message (Collapse)AuthorAge
...
* vim-patch:9.0.0820: memory leak with empty shell commandzeertzjq2023-04-18
| | | | | | | | | Problem: Memory leak with empty shell command. Solution: Free the empty string. https://github.com/vim/vim/commit/03d6e6f42b0deeb02d52c8a48c14abe431370c1c Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.0817zeertzjq2023-04-18
| | | | | | https://github.com/vim/vim/commit/fb0cf2357e0c85bbfd9f9178705ad8d77b6b3b4e Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.0815zeertzjq2023-04-18
| | | | | | https://github.com/vim/vim/commit/9c50eeb40117413bf59a9da904c8d0921ed0a6e6 Co-authored-by: Martin Tournoij <martin@arp242.net>
* vim-patch:9.0.0785: memory leak with empty shell commandzeertzjq2023-04-18
| | | | | | | | | Problem: Memory leak with empty shell command. Solution: Free the allocated memory when bailing out. https://github.com/vim/vim/commit/9652249a2d02318a28a63a7b5711f25652e8f969 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.0783: ":!" doesn't do anything but does update the previous ↵zeertzjq2023-04-18
| | | | | | | | | | | | command Problem: ":!" doesn't do anything but does update the previous command. Solution: Do not have ":!" change the previous command. (Martin Tournoij, closes vim/vim#11372) https://github.com/vim/vim/commit/8107a2a8af80a53a61734b600539c5beb4782991 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* refactor: remove redundant castsii142023-04-07
|
* refactor: remove redundant const char * castsii142023-04-07
|
* refactor: make char * parameters const in message.cii142023-04-07
| | | | Add const to char * parameters in message.c functions and remove some redundant casts.
* refactor: remove char_u (#22829)dundargoc2023-04-02
| | | Closes https://github.com/neovim/neovim/issues/459
* refactor: add const and remove unnecessary casts (#22841)ii142023-04-01
|
* refactor(screen): screen.c delenda estbfredl2023-03-14
| | | | | | | | | | | | | drawscreen.c vs screen.c makes absolutely no sense. The screen exists only to draw upon it, therefore helper functions are distributed randomly between screen.c and the file that does the redrawing. In addition screen.c does a lot of drawing on the screen. It made more sense for vim/vim as our grid.c is their screen.c Not sure if we want to dump all the code for option chars into optionstr.c, so keep these in a optionchar.c for now.
* refactor(redraw): make cursor position redraw use the "redraw later" patternbfredl2023-03-12
|
* vim-patch:9.0.1380: CTRL-X on 2**64 subtracts two (#22530)zeertzjq2023-03-05
| | | | | | | | Problem: CTRL-X on 2**64 subtracts two. (James McCoy) Solution: Correct computation for large number. (closes vim/vim#12103) https://github.com/vim/vim/commit/5fb78c3fa5c996c08a65431d698bd2c251eef5c7 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* refactor: replace char_u with char (#21901)dundargoc2023-02-11
| | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* build: enable MSVC level 3 warnings (#21934)dundargoc2023-02-11
| | | | | | MSVC has 4 different warning levels: 1 (severe), 2 (significant), 3 (production quality) and 4 (informational). Enabling level 3 warnings mostly revealed conversion problems, similar to GCC/clang -Wconversion flag.
* refactor: reduce scope of locals as per the style guide (#22206)dundargoc2023-02-11
|
* refactor(ui): remove some superfluous ui_flush() callsbfredl2023-02-09
| | | | | | | | - <expr> mapping has no business saving and restoring the low-level UI cursor. The cursor will be put in a reasonable position after input is processed, chill out. - TUI handles output needed for suspend - vgetc() family of function does flushing
* refactor: replace char_u with char 25 (#21838)dundargoc2023-01-19
| | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with char 24 (#21823)dundargoc2023-01-18
| | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with char 22 (#21786)dundargoc2023-01-17
| | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with char 21 (#21779)dundargoc2023-01-14
| | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with char 20 (#21714)dundargoc2023-01-13
| | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* fix(powershell): wrong length allocation for ":%w !" #20530Enan Ajmain2023-01-12
| | | | | | | | | | | | | | | | | | | Problem: The calculation of `len` in `make_filter_cmd` for powershell falls short by one character for the following ex command: :%w !sort This command satisfies these conditions: - `itmp` is not null - `otmp` is null __NOTE__ that other shells circumvent this bug only because of `len` allocation for six extra characters: a pair of curly braces and four spaces: https://github.com/neovim/neovim/blob/cfdb4cbada8c65aa57e69776bcc0f7b8b298317a/src/nvim/ex_cmds.c#L1551-L1554 If allocation for these six characters are removed, then bash also faces the same bug. Solution: Add allocation for 6 extra bytes. 1 would do, but let's keep powershell in sync with other shells as much as possible.
* vim-patch:partial:9.0.1166: code is indented more than necessary (#21716)zeertzjq2023-01-10
| | | | | | | | | | | | | | | | | | | | | | Problem: Code is indented more than necessary. Solution: Use an early return where it makes sense. (Yegappan Lakshmanan, closes vim/vim#11792) https://github.com/vim/vim/commit/1cfb14aa972ccf3235ac67f07b7db1175b7c5384 Partial port as some highlight.c changes depend on previous patches. Cherry-pick fname_match() change from patch 8.2.4959. Omit internal_func_check_arg_types(): only used for Vim9 script. N/A patches for version.c: vim-patch:9.0.1167: EditorConfig files do not have their own filetype Problem: EditorConfig files do not have their own filetype. Solution: Add the "editorconfig" filetype. (Gregory Anders, closes vim/vim#11779) https://github.com/vim/vim/commit/d41262ed06564cef98a3800e2928e6e0db91abbf Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* refactor: replace char_u with char 18 (#21237)dundargoc2023-01-09
| | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with chardundargoc2023-01-09
| | | | Work on https://github.com/neovim/neovim/issues/459
* vim-patch:9.0.1115: code is indented more than needed (#21598)zeertzjq2022-12-31
| | | | | | | | | Problem: Code is indented more than needed. Solution: Use an early return to reduce indenting. (Yegappan Lakshmanan, closes vim/vim#11758) https://github.com/vim/vim/commit/ed0c1d5d4b30d03b26ff08841f6da2ddf44025a7 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* vim-patch:9.0.1092: search error message doesn't show used pattern (#21518)zeertzjq2022-12-24
| | | | | | | | | Problem: Search error message doesn't show used pattern. Solution: Pass the actually used pattern to where the error message is given. (Rob Pilling, closes vim/vim#11742) https://github.com/vim/vim/commit/e86190e7c1297da29d0fc2415fdeca5ecae8d2ba Co-authored-by: Rob Pilling <robpilling@gmail.com>
* refactor: replace char_u with char 16 - remove STRNCMP (#21208)dundargoc2022-12-21
| | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* refactor: rename mch_msg => os_msgJustin M. Keyes2022-12-16
|
* vim-patch:8.2.2295: incsearch does not detect empty pattern properlyzeertzjq2022-12-04
| | | | | | | | Problem: Incsearch does not detect empty pattern properly. Solution: Return magic state when skipping over a pattern. (Christian Brabandt, closes vim/vim#7612, closes vim/vim#6420) https://github.com/vim/vim/commit/d93a7fc1a98a58f8101ee780d4735079ad99ae35
* vim-patch:8.2.2182: Vim9: value of 'magic' is still relevantzeertzjq2022-12-04
| | | | | | | | | | | Problem: Vim9: value of 'magic' is still relevant. Solution: Always behave like 'magic' is on in Vim9 script (closes vim/vim#7509) https://github.com/vim/vim/commit/f4e2099e39ed4d71aed0f9a9579455aed5ec6cc2 EX_NONWHITE_OK is N/A: only applies to Vim9 script. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* refactor: move ex_retab() to indent.czeertzjq2022-11-30
|
* vim-patch:8.2.5102: interrupt not caught in testzeertzjq2022-11-30
| | | | | | | | | | | | | | Problem: Interrupt not caught in test. Solution: Consider an exception thrown in the current try/catch when got_int is set. Also catch early exit when not using try/catch. https://github.com/vim/vim/commit/8bea171f154845046239c61bdef50a8e0f12f643 Cherry-pick test changes from patch 8.2.0557. https://github.com/vim/vim/commit/bfe13ccc58ccb96f243a58309800410db1ccb52c Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.5080: when indenting gets out of hand it is hard to stopzeertzjq2022-11-30
| | | | | | | | | Problem: When indenting gets out of hand it is hard to stop. Solution: When line gets too long set got_int. https://github.com/vim/vim/commit/a7ac4c9c395d64059437e37045fa0ad5f9fecb0b Co-authored-by: Bram Moolenaar <Bram@vim.org>
* feat(secure): add `:trust` command and vim.secure.trust() (#21107)Jlll12022-11-28
| | | | | | | | | Introduce vim.secure.trust() to programmatically manage the trust database. Use this function in a new :trust ex command which can be used as a simple frontend. Resolves: https://github.com/neovim/neovim/issues/21092 Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: ii14 <ii14@users.noreply.github.com>
* refactor: replace char_u with charDundar Göc2022-11-26
| | | | Work on https://github.com/neovim/neovim/issues/459
* fix(ex_cmds): fix a mistake in the porting of Vim patch 8.1.0306 (#21096)zeertzjq2022-11-18
|
* refactor: deprecate 'secure' optionGregory Anders2022-11-17
| | | | | Now that 'exrc' files must be explicitly marked trusted there is no need to constrain what can be done in them.
* Merge pull request #20157 from dundargoc/build/iwyubfredl2022-11-15
|\ | | | | build: allow IWYU to fix includes for all .c files
| * build: allow IWYU to fix includes for all .c filesdundargoc2022-11-15
| | | | | | | | | | | | | | | | | | | | Allow Include What You Use to remove unnecessary includes and only include what is necessary. This helps with reducing compilation times and makes it easier to visualise which dependencies are actually required. Work on https://github.com/neovim/neovim/issues/549, but doesn't close it since this only works fully for .c files and not headers.
* | ci(windows): treat compiler warnings as errorsdundargoc2022-11-14
|/ | | | Reduce the warning level from 3 to 1 and fix all warnings.
* vim-patch:9.0.0845: shell command with just space gives strange error (#21029)zeertzjq2022-11-12
| | | | | | | | | Problem: Shell command with just space gives strange error. Solution: Skip white space at start of the argument. (Christian Brabandt, Shane-XB-Qian, closes vim/vim#11515, closes vim/vim#11495) https://github.com/vim/vim/commit/4e7590ec00483077daaa567aa2220bc8df912f3c Co-authored-by: shane.xb.qian <shane.qian@foxmail.com>
* Merge pull request #20821 from dundargoc/refactor/clang-tidybfredl2022-11-08
|\ | | | | refactor: fix clang-tidy warnings
| * refactor: fix clang-tidy warningsdundargoc2022-11-06
| | | | | | | | | | | | | | | | Enable and fix bugprone-misplaced-widening-cast warning. Fix some modernize-macro-to-enum and readability-else-after-return warnings, but don't enable them. While the warnings can be useful, they are in general too noisy to enable.
* | feat: ":write ++p" creates parent dirs #20835Victor Blanchard2022-11-06
| | | | | | | | | | | | | | | | | | | | | | - `:write ++p foo/bar/baz.txt` should create parent directories `foo/bar/` if they do not exist - Note: `:foo ++…` is usually for options. No existing options have a single-char abbreviation (presumably by design), so it's safe to special-case `++p` here. - Same for `writefile(…, 'foo/bar/baz.txt', 'p')` - `BufWriteCmd` can see the ++p flag via `v:cmdarg`. closes #19884
* | vim-patch:8.2.2856: get readonly error for device that can't be written tozeertzjq2022-11-07
|/ | | | | | | | | Problem: Get readonly error for device that can't be written to. Solution: Check for being able to write first. (closes vim/vim#8205) https://github.com/vim/vim/commit/50157ef1c2e36d8696e79fd688bdd08312196bc6 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.0612: Vim9: no check for space before #commentzeertzjq2022-11-05
| | | | | | | | | | | Problem: Vim9: no check for space before #comment. Solution: Add space checks. https://github.com/vim/vim/commit/2c5ed4e3300378ce76c8d9c3818d6f73e5119f68 Omit ends_excmd2(): the same as ends_excmd() in legacy Vim script. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.0502: Vim9: some code is not testedzeertzjq2022-11-05
| | | | | | | | | Problem: Vim9: some code is not tested. Solution: Add more tests. Fix uncovered problems. https://github.com/vim/vim/commit/e8c4abbbd711af8fd3ed85ea69e9ac3d63a0d879 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* refactor(uncrustify): move macros definitions to enable formattingdundargoc2022-10-21
| | | | | | Uncrustify struggles to format function-like macros which are defined in deeply nested areas of the code. Un-nesting them unblocks useful formatting rules from uncrustify.