diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-08-24 13:54:27 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-08-27 22:13:45 +0200 |
commit | eacc70fb3ebae6d76112ab10647a42339f5f223f (patch) | |
tree | ef498c6f108edc29498d319de32417d90d8c0bd7 /src/nvim/lua/vim.lua | |
parent | c95f5d166fad75ad8383f76675d06907687066a7 (diff) | |
download | rneovim-eacc70fb3ebae6d76112ab10647a42339f5f223f.tar.gz rneovim-eacc70fb3ebae6d76112ab10647a42339f5f223f.tar.bz2 rneovim-eacc70fb3ebae6d76112ab10647a42339f5f223f.zip |
API: nvim_paste
Diffstat (limited to 'src/nvim/lua/vim.lua')
-rw-r--r-- | src/nvim/lua/vim.lua | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/nvim/lua/vim.lua b/src/nvim/lua/vim.lua index dca61d814a..637a4baf33 100644 --- a/src/nvim/lua/vim.lua +++ b/src/nvim/lua/vim.lua @@ -105,9 +105,10 @@ local _paste = (function() tdots = now tredraw = now tick = 0 - if (call('mode', {})):find('[vV]') then - vim.api.nvim_feedkeys('', 'n', false) - end + -- TODO + -- if mode == 'i' or mode == 'R' then + -- nvim_cancel() + -- end end vim.api.nvim_put(lines, 'c', true, true) if (now - tredraw >= 1000) or phase == 1 or phase == 3 then @@ -119,6 +120,8 @@ local _paste = (function() local dots = ('.'):rep(tick % 4) tdots = now tick = tick + 1 + -- Use :echo because Lua print('') is a no-op, and we want to clear the + -- message when there are zero dots. vim.api.nvim_command(('echo "%s"'):format(dots)) end if phase == 3 then |