aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
...
* | | Change uri_to_fname to not convert non-file URIs (#12351)Mathias Fußenegger2020-05-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Change uri_to_fname to not convert non-file URIs A URI with a scheme other than file doesn't have a local file path. * fixup! Change uri_to_fname to not convert non-file URIs * fixup! fixup! Change uri_to_fname to not convert non-file URIs
* | | fixed hang issue with --headless and -r option specified (#12209)Kei Kamikawa2020-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fixed hang issue with --headless and -r option specified Calling the do_more_prompt function in headless mode will freeze neovim because it is eventally in the input-accepting state (the same as waiting for --more--). * fixed "Press ENTER or type command to continue" to be suppressed If in headless mode, we need to exit at this point. If we continue, we will enter the normal mode and the message "Press ENTER or type command to continue" will be displayed and we will be in the input waiting state. * fixed functional ex_cmds tests * Revert "fixed "Press ENTER or type command to continue" to be suppressed" This reverts commit a02dc40e3b3fad69cedcde6abe1bd4efe39ab102. * Revert "fixed functional ex_cmds tests" This reverts commit 3bdb8da20acf34673b2c2028d15e7ce6da4c792a. * fixed conditional again * added test for fixed hang issue with --headless (#11386)
* | | test: fix flaky vim.defer_fn testHirokazu Hata2020-05-19
| | |
* | | lua: Add highlight.on_yank (#12279)Christian Clason2020-05-18
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add lua function to highlight yanked region * extract namespace, better naming, default values * add default for event argument * free timer * factor out mark to position calculation * d'oh * make sure timer stops before callback (cf. luv example) * factor out timer, more documentation * fixup * validate function argument for schedule * fix block selection past eol * correct handling of multibyte characters * move arguments around, some cleanup * move utility functions to vim.lua * use anonymous namespaces, avoid local api * rename function * add test for schedule_fn * fix indent * turn hl-yank into proper (hightlight) module * factor out position-to-region function mark extraction now part of highlight.on_yank * rename schedule_fn to defer_fn * add test for vim.region * todo: handle double-width characters * remove debug printout * do not shadow arguments * defer also callable table * whitespace change * move highlight to vim/highlight.lua * add documentation * add @return documentation * test: add check before vim.defer fires * doc: fixup
* | lsp: Handle end lines in apply_text_edits (#12314)Andreas Johansson2020-05-17
| | | | | | | | | | | | If the LSP sends an end line that is larger than what nvim considers to be the last line, you get an Index out of bounds error when fetching the line from nvim, a change that was introduced in #12223. This change removes the strict indexing and checks the return value from nvim_buf_get_lines.
* | lua: add tbl_deep_extend (#11969)Hirokazu Hata2020-05-17
| |
* | lsp: fix bug when documentEdit version=null for unattached buffer (#12272)landerlo2020-05-13
| |
* | LSP: Make applyEdit return a response (#12270)Mathias Fußenegger2020-05-11
| | | | | | | | | | | | | | | | According to the specification workspace/applyEdit needs to respond with a `ApplyWorkspaceEditResponse` See https://microsoft.github.io/language-server-protocol/specifications/specification-current/#workspace_applyEdit This is a subset of https://github.com/neovim/neovim/pull/11607
* | Merge #12275 from erw7/profile-fix-use-after-freeJustin M. Keyes2020-05-09
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | viml/profile: fix missing fixes when merging vim-patch:8.1.0130 Fix #12255 ### Steps to reproduce using `nvim -u NORC` ``` nvim -u NORC :function Test() :endfunction :profile start log1 :profile func Test :call Test() :profile stop :profile start log2 :profile func Test :call Test() :profile stop ``` ### Actual behaviour #### log1 ``` FUNCTION Test() Called 1 times ... ``` #### log2 ``` FUNCTION Test() Called 2 times ... ``` ### Expected behaviour #### log1 ``` FUNCTION Test() Called 1 times ... ``` #### log2 ``` FUNCTION Test() Called 1 times ... ```
| * | test: add more profile testserw72020-05-10
| | | | | | | | | | | | | | | - Add a test to make sure that 'profile dump' does not reset the profile. - Add a test to make sure that 'profile stop' does reset the profile.
* | | lsp: Make apply_text_edits non-ASCII safe (#12223)Christian Clason2020-05-08
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Make apply_text_edits non-ASCII safe Use `vim.str_byteindex` to correct starting and ending positions for text edits if the line contains non-ASCII characters. Fixes #12221 * text_edit may be applied to other buffers * make sure the buffer is loaded * add comments * add test for non-ASCII edits
* | lsp: Handle unknown CompletionItemKind and SymbolKind (#12257)Hirokazu Hata2020-05-07
| | | | | | | | | | | | | | | | | | | | | | * lsp: handle kinds not specified in protocol fix: #12200 If the client set "symbolKind.valueSet", the client must handle it properly even if it receives a value outside the specification. * test: add lsp.util.{get_completion_item_kind_name, get_symbol_kind_name} test case * lsp: make lsp.util.{get_completion_item_kind_name, get_symbol_kind_name} private
* | lua: Add buffer, window and tab accessors (#12268)TJ DeVries2020-05-07
|/ | | | | * Add buffer, window and tab accessors * Fix deletion and add tests
* paste: support replace mode (#11945)Jesse2020-05-05
| | | | | | * paste: support replace mode * Clean up Co-authored-by: Jesse Bakker <git@jessebakker.com>
* terminal: disable 'scrolloff' (fixes flicker)Justin M. Keyes2020-05-04
| | | | | | | | | | Besides the special-case in get_scrolloff_value(), it makes sense for 'scrolloff' and 'sidescrolloff' to reflect the correct values (for plugins, scripts, …). ref 53d607af9c53accfd634435908fb79061f1212b9 ref #11915 ref #12230
* LSP: Avoid URI-to-fname conversion for non-file URIs #12243Mathias Fußenegger2020-05-04
| | | Fixes https://github.com/neovim/neovim/issues/12210
* Merge pull request #12237 from h-michael/vim-nilMatthieu Coudron2020-05-04
|\ | | | | lsp: text_document.version may be vim.NIL not nil
| * lsp: add a lsp.util.apply_text_edits test(pending)Hirokazu Hata2020-05-04
| | | | | | | | | | We don't handle non-ASCII characters well in UTF-16. So I add a non-ASCII characters test case.
| * lsp: fix apply_text_document_edit testHirokazu Hata2020-05-04
| | | | | | | | | | | | lsp.util.buf_versions must be set in advance. Use helper.insert to create an anonymous buffer, so create a named buffer for testing without using insert.
| * [LSP] check for vim.NIL and add apply_text_document_edit testsckipp012020-05-01
| |
* | lsp: add lsp.util.symbols_to_items testHirokazu Hata2020-05-02
|/
* Merge pull request #12204 from archseer/lsp-user-dataMatthieu Coudron2020-04-30
|\ | | | | lsp/completion: Expose completion_item under completed_items.user_data + vim-patch:8.2.0084
| * lsp/completion: Expose completion_item under completed_items.user_data.Blaž Hrastnik2020-04-29
| | | | | | | | | | By passing through completion_item it's now possible for snippet plugins to add LSP snippet support.
* | LSP: enable using different highlighting rules for LSP signs (#12176)Ghjuvan Lacambre2020-04-29
|/ | | | | | | | | | | | | This commit creates 4 new highlight groups: - LspDiagnosticsErrorSign - LspDiagnosticsWarningSign - LspDiagnosticsInformationSign - LspDiagnosticsHintSign These highlight groups are linked to their corresponding LspDiagnostics highlight groups by default. This lets users choose a different color for their sign columns and virtualtext diagnostics.
* api/ui: simplify popup menu position get/set logic; fix testYatao Li2020-04-28
|
* api/ui: allow set bounds row and col to be less than 0; ui_pum_get_pos: ↵Yatao Li2020-04-28
| | | | return first extui bounds information instead of reducing
* gen_api_dispatch.lua: allow msgpack int for Float args; test: add ↵Yatao Li2020-04-28
| | | | ui_pum_set_bounds and tv_dict_add_float tests
* Merge #12155 ':ls filter by terminal, lastused'Justin M. Keyes2020-04-26
|\
| * vim-patch:8.0.1651: cannot filter :ls output for terminal buffersRob Pilling2020-04-19
| | | | | | | | | | | | Problem: Cannot filter :ls output for terminal buffers. Solution: Add flags for terminal buffers. (Marcin Szamotulski, closes vim/vim#2751) https://github.com/vim/vim/commit/0751f51a5b428805a8c1e9fe529693d032bec991
* | LSP: Fix show_line_diagnostics #12186Mathias Fußenegger2020-04-26
| | | | | | Messed this up in ef0398fe88e6cc74f33fb20519997774168d7832
* | LSP: Expose diagnostics grouped by bufnr (#11932)Mathias Fußenegger2020-04-25
| | | | | | | | | | | | | | | | | | Expose `vim.lsp.buf.diagnostics_by_buf` This makes it easier to customize the diagnostics behavior. For example to defer the update they can override the `textDocument/publishDiagnostics` callback to only call `buf_diagnostics_save_positions` and then defer the other actions to a autocmd event.
* | terminal: Fix mouse coordinates issue (#12158)erw72020-04-21
| | | | | | | | | | | | Offsets of window were not taken into account when sending mouse coordinates to the terminal. Therefore, when nu or rnu is set, the mouse coordinates sent to the terminal were not correct. Change it to send the correct coordinates by subtract window offset from col.
* | Merge pull request #11989 from Weypare/textEditMatthieu Coudron2020-04-20
|\ \ | |/ |/| LSP/completion: add textEdit support
| * test: add docs for get_completion_word testAndrey Avramenko2020-04-20
| |
| * test: add get_completion_word test for text_doc...Andrey Avramenko2020-04-20
| | | | | | | | ...ument_completion_list_to_complete_items
* | lua: allow deepcopy of functions (#12136)Tristan Konolige2020-04-19
| |
* | api/ui: win_viewport event for visible range and cursor position in windowBjörn Linse2020-04-01
| |
* | vim.uri: fix uri_to_fname (#12059)Hirokazu Hata2020-03-30
| | | | | | | | | | fix: #12056 If the colon of the drive letter of windows is URI encoded, it doesn't match the expected pattern, so decode it first.
* | Merge pull request #11746 from Billy4195/add_wildmenu_keyMatthieu Coudron2020-03-28
|\ \ | | | | | | [RFC] Wildmenu support C-E and C-Y as popupmenu
| * | ex_getln.c: wildmenu add cancel and apply opsBilly Su2020-01-23
| | |
* | | popupmenu: don't use 'rightleft' option in cmdline modeBjörn Linse2020-03-23
| | | | | | | | | | | | | | | Cmdline is always drawn from the left to right, so using rightleft popupmenu is not useful here
* | | TUI: do not use "nvim_get_option" in tui threaderw72020-03-21
| | | | | | | | | | | | | | | | | | Since "nvim_get_option" is executed on the tui thread as a C function instead of msgpack-rpc, it accesses global variables that may change on the main thread.
* | | vim-patch:8.1.0864 Make 'scrolloff' and 'sidescrolloff' options window local ↵Will Eccles2020-03-17
| |/ |/| | | | | | | | | | | | | | | | | (#11854) Problem: cannot have a local value for 'scrolloff' and 'sidescrolloff' Author: Bram Moolenar https://github.com/vim/vim/commit/375e3390078e740d3c83b0c118c50d9a920036c7
* | Merge pull request #11716 from teto/folds_auto_backupMatthieu Coudron2020-03-02
|\ \ | | | | | | [RFC] foldcolumn autowidth
| * | foldcolumn: allow auto:XMatthieu Coudron2020-02-29
| | | | | | | | | | | | | | | | | | | | | | | | Similar to signcolumn, allow foldcolumn to adapt itself to the number of folds. Regression: vim supports a maximum fdc of 12, this limits it to 9.
* | | lua: add vim.tbl_len() #11889Hirokazu Hata2020-03-01
| | |
* | | vim-patch:8.1.1510: a plugin cannot easily expand a command like done internallyJan Edmund Lazo2020-03-01
| | | | | | | | | | | | | | | | | | Problem: A plugin cannot easily expand a command like done internally. Solution: Add the expandcmd() function. (Yegappan Lakshmanan, closes vim/vim#4514) https://github.com/vim/vim/commit/80dad48c5095d30873a42ec82628bdb213125d8e
* | | Merge #11805 'vim-patch:8.1.0619'Justin M. Keyes2020-02-29
|\ \ \
| * | | vim-patch:8.1.0619: :echomsg and :echoerr do not handle List and DictJan Edmund Lazo2020-02-29
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: :echomsg and :echoerr do not handle List and Dict like :echo does. (Daniel Hahler) Solution: Be more tolerant about the expression result type. https://github.com/vim/vim/commit/461a7fcfce3cd6414f990037e6468af3b5ccf119 Add lua functional tests for :echo,:echon,:echomsg,:echoerr because nvim did not port "test_" functions from Vim that modify internal state. Testing :echoerr via try/catch is sufficient.
* / / lsp: add 'textDocument/documentSymbol’ callbackHirokazu Hata2020-03-01
|/ / | | | | | | Spec: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_documentSymbol