aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds.c
Commit message (Collapse)AuthorAge
...
* vim-patch:8.1.1547: functionality of bt_nofile() is confusingzeertzjq2022-07-15
| | | | | | Problem: Functionality of bt_nofile() is confusing. Solution: Split into bt_nofile() and bt_nofilename(). https://github.com/vim/vim/commit/26910de8b0da6abab87bd5a397330f9cbe483309
* vim-patch:8.0.1118: FEAT_WINDOWS adds a lot of #ifdefszeertzjq2022-07-15
| | | | | | | Problem: FEAT_WINDOWS adds a lot of #ifdefs while it is nearly always enabled and only adds 7% to the binary size of the tiny build. Solution: Graduate FEAT_WINDOWS. https://github.com/vim/vim/commit/4033c55eca575777718c0701e26635a0cc47d907
* vim-patch:8.2.2732: prompt for s///c in Ex mode can be wrongzeertzjq2022-07-12
| | | | | | Problem: Prompt for s///c in Ex mode can be wrong. Solution: Position the cursor before showing the prompt. (closes vim/vim#8073) https://github.com/vim/vim/commit/e5b0b98a90acf420bb611fc99534982c98d0645b
* fix(cmdline): fix passing -1 as charzeertzjq2022-07-12
|
* vim-patch:8.2.3363: when :edit reuses the current buffer the alternate file ↵zeertzjq2022-07-11
| | | | | | | | | | | | is set (#19306) Problem: When :edit reuses the current buffer the alternate file is set to the same buffer. Solution: Only set the alternate file when not reusing the buffer. (closes vim/vim#8783) https://github.com/vim/vim/commit/b8bd2e6ebab03baf2672067067a599df69a278c0 Cherry-pick Test_cmdline_expand_special() from patches 8.2.{0243,2873}. Move Test_cmd_backtick() to the right place.
* refactor: replace char_uDundar Goc2022-07-02
| | | | Work on https://github.com/neovim/neovim/issues/459
* vim-patch:8.2.0049: command line completion not fully testedzeertzjq2022-07-01
| | | | | | | Problem: Command line completion not fully tested. Solution: Add more test cases. Make help sorting stable. (Dominique Pelle, closes vim/vim#5402) https://github.com/vim/vim/commit/297610ba4b110c918ffe60c45eb4a1d6ea2daae5
* cmdheight=0: fix bugs #18961Shougo2022-06-30
| | | | | | | | | | | | Continue of #16251 Fix #18953 Fix #18960 Fix #18958 Fix #18955 Fix #18970 Fix #18983 Fix #18995 Fix #19112
* feat(marks): restore viewport on jump #15831Javier Lopez2022-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ** Refactor Previously most functions used to "get" a mark returned a position, changed the line number and sometimes changed even the current buffer. Now functions return a {x}fmark_T making calling context aware whether the mark is in another buffer without arcane casting. A new function is provided for switching to the mark buffer and returning a flag style Enum to convey what happen in the movement. If the cursor changed, line, columns, if it changed buffer, etc. The function to get named mark was split into multiple functions. - mark_get() -> fmark_T - mark_get_global() -> xfmark_T - mark_get_local() -> fmark_T - mark_get_motion() -> fmark_T - mark_get_visual() -> fmark_T Functions that manage the changelist and jumplist were also modified to return mark types. - get_jumplist -> fmark_T - get_changelist -> fmark_T The refactor is also seen mainly on normal.c, where all the mark movement has been siphoned through one function nv_gomark, while the other functions handle getting the mark and setting their movement flags. To handle whether context marks should be left, etc. ** Mark View While doing the refactor the concept of a mark view was also implemented: The view of a mark currently implemented as the number of lines between the mark position on creation and the window topline. This allows for moving not only back to the position of a mark but having the window look similar to when the mark was defined. This is done by carrying and extra element in the fmark_T struct, which can be extended later to also restore horizontal shift. *** User space features 1. There's a new option, jumpoptions+=view enables the mark view restoring automatically when using the jumplist, changelist, alternate-file and mark motions. <C-O> <C-I> g; g, <C-^> '[mark] `[mark] ** Limitations - The view information is not saved in shada. - Calls to get_mark should copy the value in the pointer since we are using pos_to_mark() to wrap and provide a homogeneous interfaces. This was also a limitation in the previous state of things.
* refactor: replace char_u #18429dundargoc2022-06-28
| | | Work on https://github.com/neovim/neovim/issues/459
* Merge pull request #19077 from dundargoc/refactor/conversionbfredl2022-06-27
|\ | | | | refactor: enable -Wconversion warning for ex_cmds.c
| * refactor: enable -Wconversion warning for ex_cmds.cDundar Goc2022-06-25
| | | | | | | | Work on https://github.com/neovim/neovim/issues/567
* | refactor(tests): introduce testprg()Justin M. Keyes2022-06-25
| | | | | | | | | | | | Also: - Add a describe('shell :!') section to system_spec. - Make the test for #16271 work on systems without powershell.
* | fix: make_filter_cmd for :! powershell #15913Enan Ajmain2022-06-25
|/ | | | | | | | | | | | | Problem: Nvim fails to create tempfile "…/nvim6UJx04/7" when 'shell' is set to pwsh (PowerShell Core). This breaks filtered shell commands ":{range}!". With shell set to cmd, it works. Solution: PowerShell doesn't use "<" for stdin redirection. Instead, use "-RedirectStandardInput". Closes #15913
* vim-patch:8.2.5146: memory leak when substitute expression nestszeertzjq2022-06-24
| | | | | | | | | | | | | | | | Problem: Memory leak when substitute expression nests. Solution: Use an array of expression results. https://github.com/vim/vim/commit/44ddf19ec0ff59c969658ec7d9ed42070c59c51b Cherry-pick a comment change from patch 8.2.5057. N/A patches for version.c: vim-patch:8.2.5154: still mentioning version8, some cosmetic issues Problem: Still mentioning version8, some cosmetic issues. Solution: Prefer mentioning version9, cosmetic improvements. https://github.com/vim/vim/commit/abd56da30bae4a5c6c20b9363ccae12f7b126026
* vim-patch:8.2.4977: memory access error when substitute expression changes ↵zeertzjq2022-06-24
| | | | | | | | | | window Problem: Memory access error when substitute expression changes window. Solution: Disallow changing window in substitute expression. https://github.com/vim/vim/commit/e2bd8600b873d2cd1f9d667c28cba8b1dba18839 "textwinlock" was renamed back to "textlock" in patch 8.2.5029.
* vim-patch:8.2.1898: command modifier parsing always uses global cmdmodzeertzjq2022-06-14
| | | | | | Problem: Command modifier parsing always uses global cmdmod. Solution: Pass in cmdmod_T to use. Rename struct fields consistently. https://github.com/vim/vim/commit/e10044015841711b989f9a898d427bcc1fdb4c32
* fix(substitute): subtract number of backslashes laterzeertzjq2022-06-12
|
* refactor: change type of linenr_T from long to int32_tDundar Goc2022-06-10
| | | | | | | | | | | | | The size of long varies depending on architecture, in contrast to the MAXLNUM constant which sets the maximum allowable number of lines to 2^32-1. This discrepancy may lead to hard to detect bugs, for example https://github.com/neovim/neovim/issues/18454. Setting linenr_T to a fix maximum size of 2^32-1 will prevent this type of errors in the future. Also change the variables `amount` and `amount_after` to be linenr_T since they're referring to "the line number difference" between two texts.
* fix(inccommand): avoid crash if callback changes inccommand option (#18830)zeertzjq2022-06-02
| | | | | | | | | clang: Result of operation is garbage or undefined clang: Uninitialized argument value Also check for == 's' instead of != 'n' as it is more straightforward. Also fix another unrelated PVS warning: PVS/V1071: Return value of win_comp_pos() is not always used
* Merge pull request #18194 from famiu/feat/usercmd_previewbfredl2022-05-31
|\ | | | | feat: user command "preview" (like inccommand)
| * feat: add preview functionality to user commandsFamiu Haque2022-05-31
| | | | | | | | Adds a Lua-only `preview` flag to user commands which allows the command to be incrementally previewed like `:substitute` when 'inccommand' is set.
* | vim-patch:8.2.5046: vim_regsub() can overwrite the destination (#18812)zeertzjq2022-05-31
|/ | | | | Problem: vim_regsub() can overwrite the destination. Solution: Pass the destination length, give an error when it doesn't fit. https://github.com/vim/vim/commit/4aaf3e7f4db599932d01d87e5bbcdc342cccee27
* refactor(uncrustify): set maximum number of consecutive newlines to 2 (#18695)dundargoc2022-05-25
|
* refactor!: delete insertmode (#18547)Gregory Anders2022-05-22
| | | | | | | Neovim already removed `evim` (or any similar flags). The 'insertmode' option is a weird remnant, so get rid of it. The 'insertmode' option is replaced with a script that closely emulates the option. This script is documented at :help 'insertmode'
* fix(folds): fix fold regression with :move (#18685)zeertzjq2022-05-22
|
* refactor: replace char_u variables and functions with charDundar Goc2022-05-16
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-11
| | | | Work on https://github.com/neovim/neovim/issues/459
* vim-patch:8.2.4911: the mode #defines are not clearly named (#18499)zeertzjq2022-05-10
| | | | | | | | Problem: The mode #defines are not clearly named. Solution: Prepend MODE_. Renumber them to put the mapped modes first. https://github.com/vim/vim/commit/249591057b4840785c50e41dd850efb8a8faf435 A hunk from the patch depends on patch 8.2.4861, which hasn't been ported yet, but that should be easy to notice.
* refactor: replace char_u variables and functions with charDundar Goc2022-05-09
| | | | Work on https://github.com/neovim/neovim/issues/459
* Merge pull request #18425 from dundargoc/refactor/char_u/1bfredl2022-05-07
|\ | | | | refactor: replace char_u variables and functions with char
| * refactor: replace char_u variables and functions with charDundar Goc2022-05-07
| | | | | | | | Work on https://github.com/neovim/neovim/issues/459
* | build(clint): remove "function size is too large" warningDundar Goc2022-05-06
|/ | | | | | | | This warning is essentially only triggered for ported vim functions. It's unlikely that we'll refactor vim functions solely based on their size since it'd mean we'd greatly deviate from vim, which is a high cost when it comes to importing the vim patches. Thus, this warning only serves as an annoyance and should be removed.
* refactor: replace char_u variables and functions with charDundar Goc2022-05-05
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-04
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-04
| | | | Work on https://github.com/neovim/neovim/issues/459
* vim-patch:8.2.1835: ":help ??" finds the "!!" tag (#18350)dundargoc2022-05-02
| | | | | | | | | | * vim-patch:8.2.1835: ":help ??" finds the "!!" tag Problem: ":help ??" finds the "!!" tag. Solution: Do not translate "?" into ".". (Naruhiko Nishino, closes vim/vim#7114, closes vim/vim#7115) https://github.com/vim/vim/commit/6eb36ade9883f54c84c739c6a3504ddfa3343063 Change test because patch 8.2.1794 hasn't been ported yet.
* refactor: replace char_u variables and functions with charDundar Goc2022-04-30
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with char (#18288)dundargoc2022-04-30
| | | Work on https://github.com/neovim/neovim/issues/459
* fix(input): only disable mapped CTRL-C interrupts when getting input (#18310)zeertzjq2022-04-30
|
* refactor(uncrustify): change rules to better align with the style guideDundar Goc2022-04-29
| | | | | | | | | | | | | Add space around arithmetic operators '+' and '-'. Remove space between back-to-back parentheses, i.e. ')(' vs. ') ('. Remove space between '((' or '))' of control statements. Add space between ')' and '{' of control statements. Remove space between function name and '(' on function declaration. Collapse empty blocks between '{' and '}'. Remove newline at the end of the file. Remove newline between 'enum' and '{'. Remove newline between '}' and ')' in a function invocation. Remove newline between '}' and 'while' of 'do' statement.
* refactor(uncrustify): disable formatting in problematic code sectionsDundar Goc2022-04-29
|
* revert: "refactor: Remove allow_keys global (#6346)"zeertzjq2022-04-29
|
* fix: show autocmd output when F is in shortmess (#18251)Gregory Anders2022-04-25
| | | | | | | | | | | The default value of including F in 'shortmess' has the unfortunate side effect of hiding output from autocommands. This is a common source of confusion and often leads people to think their autocommands are not working when they are. There is a small snippet in the docs for 'shortmess' indicating that the F flag suppresses autocmd output, but it's not easy to find if you don't already know to look for it. This commit removes that behavior of the F flag to make it only suppress file info when opening a new file.
* refactor: convert macros to all-caps (#17895)dundargoc2022-04-24
| | | Closes https://github.com/neovim/neovim/issues/6297
* refactor: add pure attribute to pure functions (#18165)dundargoc2022-04-24
| | | | This will allow the compilers that support the pure attribute to make further optimizations.
* vim-patch:8.2.2472: crash when using command line window in an autocommandzeertzjq2022-04-21
| | | | | | | | | Problem: Crash when using command line window in an autocommand. (houyunsong) Solution: Save and restore au_new_curbuf. https://github.com/vim/vim/commit/aad5f9d79a2b71e9d2581eace3652be156102b9d Nvim has removed :open, so use :edit in the test instead.
* vim-patch:8.2.4750: small pieces of dead code (#18113)dundargoc2022-04-15
| | | | | | Problem: Small pieces of dead code. Solution: Remove the dead code. (Goc Dundar, closes vim/vim#10190) Rename the qftf_cb struct member to avoid confusion. https://github.com/vim/vim/commit/b836658a04ee5456deca2ee523de9efe51252da3
* vim-patch:8.2.4711: when 'insermode' is set :edit from <Cmd> mapping misbehaveszeertzjq2022-04-08
| | | | | | | Problem: When 'insermode' is set :edit from <Cmd> mapping misbehaves. Solution: Don't set "need_start_insertmode" when already in Insert mode. (closes vim/vim#10116) https://github.com/vim/vim/commit/3a56b6d405fc0f1ca928b77382f97d0c552bea64
* vim-patch:8.2.0004: get E685 and E931 if buffer reload is interruptedzeertzjq2022-04-08
| | | | | | Problem: Get E685 and E931 if buffer reload is interrupted. Solution: Do not abort deleting a dummy buffer. (closes vim/vim#5361) https://github.com/vim/vim/commit/a6e8f888e7fc31b8ab7233509254fb2e2fe4089f