23 Commits
Author SHA1 Message Date
notomo 46e3e1c728 fix(api): make nvim_cmd mods.silent work correctly (#19489) 2022-07-25 09:43:39 +08:00
notomo 0e8186bdd8 fix(lua): highlight.on_yank can close timer in twice #18976
Steps to reproduce:

1. setting `vim.highlight.on_yank`
   ```
   vim.api.nvim_create_autocmd({ "TextYankPost" }, {
     pattern = { "*" },
     callback = function()
       vim.highlight.on_yank({ timeout = 200 })
     end,
   })
   ```
2. repeat typing `yeye` ...
3. causes the following error.
   ```
   Error executing vim.schedule lua callback: vim/_editor.lua:0: handle 0x01e96970 is already closing
   stack traceback:
           [C]: in function 'close'
           vim/_editor.lua: in function ''
           vim/_editor.lua: in function <vim/_editor.lua:0>
   ```

📝 Test result before fix:

    [----------] Global test environment setup.
    [----------] Running tests from test/functional/lua/highlight_spec.lua
    [ RUN      ] vim.highlight.on_yank does not show errors even if buffer is wiped before timeout: 15.07 ms OK
    [ RUN      ] vim.highlight.on_yank does not show errors even if executed between timeout and clearing highlight: 15.07 ms ERR
    test/helpers.lua:73: Expected objects to be the same.
    Passed in:
    (string) 'Error executing vim.schedule lua callback: vim/_editor.lua:0: handle 0x02025260 is already closing
    stack traceback:
            [C]: in function 'close'
            vim/_editor.lua: in function ''
            vim/_editor.lua: in function <vim/_editor.lua:0>'
    Expected:
    (string) ''
2022-06-15 19:39:55 -07:00
notomo 5eaf9ef811 fix(filetype): correct vim.fn.did_filetype() handling (#18725) 2022-05-23 18:55:03 -06:00
notomo 3d9ae9d2da feat(api): expose extmark right_gravity and end_right_gravity 2022-01-24 09:52:13 +09:00
notomo 5971b86338 feat(api): expose extmark more details 2022-01-20 13:25:46 +09:00
notomo 08e223cebb tests(lua/on_yank): assert conditions that fail correctly #15495
The test added in 274a3504a7
does not fail if the code changes are reverted.
2021-08-27 04:54:01 -07:00
notomo 274a3504a7 fix(lua): verify buffer in highlight.on_yank (#15482)
Resolve an issue with deferred clearing of highlight failing if the 
buffer is deleted before the timeout by checking whether the
buffer is valid first.
2021-08-26 16:37:36 +02:00
notomo 90b2da16ae fix(window.c): win_close from other tabpage #15454
Fix #15313
2021-08-22 15:27:20 -07:00
notomo 1a9eb7a987 api: add nvim_win_call 2021-06-10 09:34:29 +02:00
notomo 971e0ca903 fix(notify): Expected 3 arguments error (#13905) 2021-02-09 11:41:02 +01:00
notomo d3989ea8e8 api(echo): should clear cmdline before echo 2021-01-21 21:49:42 +09:00
notomo 8e86f5e460 api: nvim_echo 2021-01-20 16:41:39 +01:00
notomo b931a554d7 GHA/osx: workaround for brew update error (#13584) 2020-12-22 08:47:46 -05:00
notomo 30ef8c693c test: textlock api error 2020-12-16 21:57:24 +09:00
notomo 93ba977793 docs: add check_textlock attribute 2020-12-16 21:57:24 +09:00
notomo 356319f356 api: add textlock check 2020-12-15 20:24:33 +09:00
notomo 4a996bc431 lsp: Add vim.lsp.buf.range_code_action() (#12962)
Allows to execute code_action for a given range.
:'<,'>lua vim.lsp.buf.range_code_action()
2020-09-24 21:53:08 +02:00
notomo ac5a3f2c56 lua: fix behavior when split empty string (#12429)
* lua: fix behavior when split empty string

* test: lsp.util.apply_text_edits with an empty edit
2020-06-04 08:48:48 -04:00
notomo 60c581b35d lua: fix infinite loop for vim.split on empty string (#12420) 2020-06-02 19:31:43 -04:00
notomo 2b8e66c6ce autocmd: WinClosed exposes window id as <afile> 2020-01-18 17:06:03 -08:00
notomo 4a77df2e51 [RFC] extmark: fix E315 in nvim_buf_set_extmark (#11449)
extmark: need to use buf instead of curbuf
2019-11-25 16:50:30 +01:00
notomo 32a6b5601b Fix clint error 2019-07-28 09:22:46 +09:00
notomo 08c7e206cc vim-patch:8.1.1759: no mode char for terminal mapping from maparg()
Problem:    No mode char for terminal mapping from maparg().
Solution:   Check for TERMINAL mode. (closes vim/vim#4735)
https://github.com/vim/vim/commit/14371ed69778107654e39268d0d90982e53ad6e0
2019-07-28 08:00:52 +09:00