aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_getln.c
Commit message (Collapse)AuthorAge
...
* Merge pull request #17266 from famiu/feat/ui/global-statuslinebfredl2022-03-17
|\ | | | | feat(statusline): add global statusline
| * feat: add support for global statuslineFamiu Haque2022-03-18
| | | | | | | | | | | | | | | | | | | | Ref: #9342 Adds the option to have a single global statusline for the current window at the bottom of the screen instead of a statusline at the bottom of every window. Enabled by setting `laststatus = 3`. Due to the fact that statuslines at the bottom of windows are removed when global statusline is enabled, horizontal separators are used instead to separate horizontal splits. The horizontal separator character is configurable through the`horiz` item in `'fillchars'`. Separator connector characters are also used to connect the horizontal and vertical separators together, which are also configurable through the `horizup`, `horizdown`, `vertleft`, `vertright` and `verthoriz` items in `fillchars`. The window separators are highlighted using the `WinSeparator` highlight group, which supersedes `VertSplit` and is linked to `VertSplit` by default in order to maintain backwards compatibility.
* | chore: fix typos (#17670)dundargoc2022-03-17
| | | | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* | vim-patch:8.2.4428: crash when switching tabpage while in the cmdline windowSean Dewar2022-03-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Crash when switching tabpage while in the cmdline window. Solution: Disallow switching tabpage when in the cmdline window. https://github.com/vim/vim/commit/0f6e28f686dbb59ab3b562408ab9b2234797b9b1 Ensure cmdline window doesn't stop us from closing tabs with EXITFREE. mem_free_all -> win_free_all -> tabpage_close -> ... -> goto_tabpage_tp -> CHECK_CMDWIN can cause an infinite loop if Nvim is exited without using standard methods such as :qa! and friends (e.g: killed via a signal). This issue had caused the ASAN CI's functionaltests to timeout. Cherry-pick Test_cmdwin_tabpage from v8.2.4463. https://github.com/vim/vim/commit/38b85cb4d7216705058708bacbc25ab90cd61595 This bug was already fixed in Nvim. Note that g<Tab> inside cmdwin is already tested for in tabnewentered_spec.lua anyway. E492 is thrown after E11 when using ":norm" in assert_fails for some reason (except after v8.2.1919, which isn't ported yet). As v8.2.1183 isn't ported yet, so we cannot assert E11 directly. Modify the test to check for E11 and E492 seperately; when v8.2.1183 is ported, the assertion for E492 will fail and the changes can be reverted to match upstream. Remove redundant CHECK_CMDWIN from goto_tabpage; it's handled with text_locked() and text_locked_msg() above: vim-patch:8.2.4434: duplicate check for cmdline window Problem: Duplicate check for cmdline window. Solution: Remove the second check. (Sean Dewar, closes vim/vim#9816) https://github.com/vim/vim/commit/16b51d26fe2cc3afb09afd439069220dea74581d
* | feat(lua): add api and lua autocmdsTJ DeVries2022-02-27
|/
* fix: close floating windows when calling win_close()Rom Grk2022-02-10
|
* Merge pull request #17226 from dundargoc/refactor/remove-redundant-codezeertzjq2022-02-03
|\ | | | | vim-patch:8.2.4241: some type casts are redundant
| * vim-patch:8.2.4241: some type casts are redundantDundar Göc2022-01-30
| | | | | | | | | | | | | | | | Problem: Some type casts are redundant. Solution: Remove the type casts. (closes vim/vim#9643) https://github.com/vim/vim/commit/420fabcd4ffeaf79082a6e43db91e1d363f88f27 This is not a literal port but an equivalent one.
* | vim-patch:8.2.3629: command completion in cmdline window uses global commandsSean Dewar2022-01-30
|/ | | | | | | Problem: Command completion in cmdline window uses global user commands, not local commands for the window where it was opened from. Solution: Use local commands. (closes vim/vim#9168) https://github.com/vim/vim/commit/a1198124370a366ff02811a43845a631b5c6e7f0
* vim-patch:8.2.4214: illegal memory access with large 'tabstop' in Ex modeChristian Clason2022-01-26
| | | | | | Problem: Illegal memory access with large 'tabstop' in Ex mode. Solution: Allocate enough memory. https://github.com/vim/vim/commit/85b6747abc15a7a81086db31289cf1b8b17e6cb1
* feat(api): add support for lua function & description in keymapshadmansaleh2022-01-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Behavioral changes: 1. Added support for lua function in keymaps in -------------------------------------------- - nvim_set_keymap Can set lua function as keymap rhs like following: ```lua vim.api.nvim_{buf_}set_keymap('n', '<leader>lr', '', {callback = vim.lsp.buf.references}) ``` Note: lua function can only be set from lua . If api function being called from viml or over rpc this option isn't available. - nvim_{buf_}get_keymap When called from lua, lua function is returned is `callback` key . But in other cases callback contains number of the function ref. - :umap, nvim_del_keymap & nvim_buf_del_keymap clears lua keymaps correctly. - :map commands for displaing rhs . For lua keymaps rhs is displayed as <Lua function ref_no> Note: lua keymap cannot be set through viml command / functions. - mapargs() When dict is false it returns string in `<Lua function ref_no>` format (same format as :map commands). When dict is true it returns ref_no number in `callback` key. - mapcheck() returns string in `<Lua function ref_no>` format (same format as :map commands). 2. Added support for keymap description --------------------------------------- - nvim_{buf_}set_keymap: added `desc` option in opts table . ```lua vim.api.nvim_set_keymap('n', '<leader>w', '<cmd>w<cr>', {desc='Save current file'}) ``` - nvim_{buf_}get_keymap: contains `desc` in returned list. - commands like `:nmap <leader>w` will show description in a new line below rhs. - `maparg()` return dict contains `desc`.
* feat(api): implement nvim_{add,del}_user_commandGregory Anders2021-12-28
| | | | | Add support for adding and removing custom user commands with the Nvim API.
* refactor(misc1): move out high-level input functions to a new file: input.cBjörn Linse2021-12-10
| | | | | Possibly dialog code is messages.c could be moved here as well. misc1.c is now empty, so delete it.
* lint (#16526)Jan Edmund Lazo2021-12-05
|
* Merge pull request #15840 from vimpostor/vim-8.2.3430Jan Edmund Lazo2021-11-30
|\ | | | | vim-patch:8.2.{3430,3434,3462,3463,3555,3609,3610}: ModeChanged autocmd
| * vim-patch:8.2.3609: internal error when ModeChanged is triggered recursivelyMagnus Groß2021-11-18
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Internal error when ModeChanged is triggered when v:event is already in use. Solution: Save and restore v:event if needed. https://github.com/vim/vim/commit/3075a45592fe76f2febb6321632a23e352efe949 In the vim codebase there is no occurrence of get_vim_var_dict(VV_EVENT) after the above patch, so in order to hold the same invariant in the neovim codebase we needed to replace more occurrences than the related vim patch.
| * vim-patch:8.2.3430: no generic way to trigger an autocommand on mode changeMagnus Groß2021-11-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: No generic way to trigger an autocommand on mode change. Solution: Add the ModeChanged autocommand event. (Magnus Gross, closes vim/vim#8856) https://github.com/vim/vim/commit/f1e8876fa2359b572d262772747405d3616db670 N/A patches for version.c: vim-patch:8.2.3434: function prototype for trigger_modechanged() is incomplete Problem: Function prototype for trigger_modechanged() is incomplete. Solution: Add "void". https://github.com/vim/vim/commit/28e591dd5080bbcd0f468f9d9597cedb716e28c9 Fixes #4399. Fixes #7416.
* | refactor: saner options for uncrustify (#16204)dundargoc2021-11-19
|/ | | | | | | | | | | | | | | | | | | | | | | | * sp_enum_after_assign = force * sp_brace_typedef = force * nl_do_brace = remove * sp_do_brace_open = force * sp_brace_close_while = force * sp_before_semi = remove * sp_before_semi_for = remove * sp_before_semi_for_empty = remove * sp_between_semi_for_empty = remove * sp_after_semi_for_empty = remove * sp_before_square = remove * sp_before_squares = remove * sp_inside_square = remove * sp_inside_fparens = remove * sp_inside_fparen = remove * sp_inside_tparen = remove * sp_after_tparen_close = remove * sp_return_paren = force * pos_bool = lead * sp_pp_concat = remove * sp_pp_stringify = remove * fixup: disable formatting for the INIT section
* refactor: reduce number of explicit char casts (#16077)dundargoc2021-11-16
| | | * refactor: reduce number of explicit char casts
* refactor(multibyte): eliminate mb_ptr2len alias for utfc_ptr2lenBjörn Linse2021-11-14
|
* vim-patch:8.1.0779: argument for message functions is inconsistentJames McCoy2021-11-01
| | | | | | Problem: Argument for message functions is inconsistent. Solution: Make first argument to msg() "char *". https://github.com/vim/vim/commit/32526b3c1846025f0e655f41efd4e5428da16b6c
* vim-patch:8.1.0743: giving error messages is not flexibleJames McCoy2021-11-01
| | | | | | | | | Problem: Giving error messages is not flexible. Solution: Add semsg(). Change argument from "char_u *" to "char *", also for msg() and get rid of most MSG macros. (Ozaki Kiichi, closes vim/vim#3302) Also make emsg() accept a "char *" argument. Get rid of an enormous number of type casts. https://github.com/vim/vim/commit/f9e3e09fdc93be9f0d47afbc6c7df1188c2a5a0d
* refactor: saner options for uncrustify #16196dundargoc2021-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * refactor: general good option changes sp_deref = remove sp_not = remove sp_inv = remove sp_inside_paren_cast = remove mod_remove_duplicate_include = true sp_after_semi = add sp_after_semi_for = force sp_sizeof_paren = remove nl_return_expr = remove nl_else_brace = remove nl_else_if = remove * refactor: mod_remove_extra_semicolon = true * refactor: nl_max = 3 * refactor: sp_bool = force * refactor: sp_compare = force * refactor: sp_inside_paren = remove * refactor: sp_paren_paren = remove * refactor: sp_inside_sparen = remove * refactor: sp_before_sparen = force * refactor: sp_sign = remove * refactor: sp_addr = remove * refactor: sp_member = remove * refactor: nl_struct_brace = remove * refactor: nl_before_if_closing_paren = remove * refactor: nl_fdef_brace = force * refactor: sp_paren_comma = force * refactor: mod_full_brace_do = add
* refactor: uncrustify #16090dundargoc2021-10-29
|
* vim-patch:8.1.2379: using old C style commentsDundar Göc2021-10-21
| | | | | | Problem: Using old C style comments. Solution: Use // comments where appropriate. https://github.com/vim/vim/commit/217e1b8359447f5550dcb0d1ee43380a90c253c5
* Merge pull request #15930 from dundargoc/vim-patch/old-style-c-commentsJan Edmund Lazo2021-10-17
|\ | | | | vim-patch:8.1.2396,8.1.2395,8.1.2394,8.1.2392,8.1.2368,8.1.2388,8.1.2379
| * vim-patch:8.1.2379: using old C style commentsDundar Göc2021-10-06
| | | | | | | | | | | | Problem: Using old C style comments. Solution: Use // comments where appropriate. https://github.com/vim/vim/commit/217e1b8359447f5550dcb0d1ee43380a90c253c5
* | refactor: reduce number of unique char casts (#15995)dundargoc2021-10-12
|/
* feat(ex_checkhealth): provide function for command line completionJavier López2021-10-04
| | | | | | | | | Move away from providing completion with ExpandRTDir to ExpandGeneric providing the function get_healthcheck_name which caches the results for the current command line prompt. It does the almost the same thing the Vim function 'get_healthcheck' implemented in 'runtime/autoload/health.vim' does.
* refactor: remove redundant char casts #15888dundargoc2021-10-04
|
* Refactor/uncrustify (#15790)dundargoc2021-09-29
| | | | | | | | | | | | | * refactor: format with uncrustify * fixup(dundar): fix functions comments * fixup(dundar): remove space between variable and ++/-- * fixup(dundar): better workaround for macro attributes This is done to be able to better use uncrustify rules for macros * fixup(justin): make preprocessors follow neovim style guide
* refactor: format with uncrustify #15778dundargoc2021-09-25
| | | * fixup: force exactly one whitespace between type and variable
* refactor: reformat with uncrustify #15736dundargoc2021-09-20
| | | | * fix function parameter comments * remove space after star in function names
* fix(inccommand): ignore trailing commands only for *previewed* command #15638itchyny2021-09-20
| | | | | | | | Since the `State` is global, other scripts are unexpectedly affected during the 'inccommand' preview. This commit introduces a new flag for `do_cmdline`, in order to ignore trailing '|'-separated commands only for the command invoking the preview. fix #8796, update #7494
* refactor: format with uncrustify #15726dundargoc2021-09-20
|
* vim-patch:8.1.1355: obvious mistakes are accepted as valid expressionsSean Dewar2021-09-11
| | | | | | | | | Problem: Obvious mistakes are accepted as valid expressions. Solution: Be more strict about parsing numbers. (Yasuhiro Matsumoto, closes vim/vim#3981) https://github.com/vim/vim/commit/16e9b85113e0b354ece1cb4f5fcc7866850f3685 Update vim_str2nr_spec.lua to add more tests that use strict = true.
* refactor: replace TRUE/FALSE with true/false #15425dundargoc2021-08-22
|
* feat(defaults): map CTRL-L to search highlights, update diffs #15385Gregory Anders2021-08-16
|
* refactor(plines): remove implicit curwin plines() functionBjörn Linse2021-08-10
|
* vim-patch:8.2.3225: incsearch highlighting is attempted halfway a mappingJan Edmund Lazo2021-08-01
| | | | | | | Problem: Incsearch highlighting is attempted halfway a mapping. Solution: Only do incsearch highlighting if keys were typed or there is no more typeahead. https://github.com/vim/vim/commit/ccb148ac63941feba879ea4678aa4713d81494f2
* refactor: replace TRUE/FALSE with true/falseDundar Göc2021-07-30
|
* Remove EXMODE_NORMALmatveyt2021-07-23
|
* refactor: remove all mentions to `curbuf_lock`Thomas Vigouroux2021-07-08
|
* undo: reduce reliance on curbufThomas Vigouroux2021-07-06
|
* enhance(runtime): Enable completion for lua filesshadmansaleh2021-06-11
| | | | Enabled for `:colorscheme` `:compiler` filetype
* Add 'FUNC_ATTR_NONNULL_RET' to nonnull alloc funcs (#14559)Jan Edmund Lazo2021-05-15
|
* vim-patch:8.2.2473: crash when leaving command line window triggers autocommandJan Edmund Lazo2021-05-13
| | | | | | | | | | | | | | | Problem: Crash when leaving command line window triggers autocommand. (houyunsong) Solution: Make sure not to close the current window or buffer. https://github.com/vim/vim/commit/8c6951fa2836a1ae3257770e7b927a9380439912 N/A patches for version.c: vim-patch:8.2.2414: using freed memory when closing the cmdline window Problem: Using freed memory when closing the cmdline window. Solution: Check the window is still valid. https://github.com/vim/vim/commit/b7e2670b6a1de02c772af5097ba24f2a15b26eec
* vim-patch:8.0.1309: cannot use 'balloonexpr' in a terminalJan Edmund Lazo2021-05-06
| | | | | | | Problem: Cannot use 'balloonexpr' in a terminal. Solution: Add 'balloonevalterm' and add code to handle mouse movements in a terminal. Initial implementation for Unix with GUI. https://github.com/vim/vim/commit/51b0f3701ecb440aa72ab6017c1df6940c0e0f6f
* vim-patch:8.2.2737: status line not updated when local 'statusline' option ↵bphilly962021-04-08
| | | | | | | set (#14325) Problem: Status line not updated when local 'statusline' option set. Solution: Check the 'statusline' option of each window. https://github.com/vim/vim/commit/d8db8383926cb8729417d9515cbfaf455dbbd8d1
* vim-patch:8.2.0295: highlighting for :s wrong when using different separator ↵Ghjuvan Lacambre2021-04-04
| | | | | | | | (#14286) Problem: Highlighting for :s wrong when using different separator. Solution: Use separat argument for search direction and separator. (Rob Pilling, closes vim/vim#5665) https://github.com/vim/vim/commit/c036e87bd7001238ab7cc5d9e30e59bbf989a5fd