registers.nvim
registers.nvim copied to clipboard
visual map not work in quickfix or floaterm window
Hi, here is my experience with visual map in quickfix or floaterm window that I feel not right.
vimrc
if empty(glob('~/.config/nvim/autoload/plug.vim'))
silent execute '!curl -fLo '.s:home.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin('~/.config/nvim/bundle/pkgs/')
Plug 'tversteeg/registers.nvim'
call plug#end()
filetype plugin on
filetype indent on
reproduce
- vim open a file
:grep somethingin a file:copen- visually select a line then
"+ - after hitting
+the cursor jump to editing file from quickfix window.
some problem happen from a floaterm window, it go the insert mode instead yank the text
env
I test with nvim-0.7.0 but it should also reproduce with nvim 0.6
I've added a change that won't open the registers window when the buffer is not modifiable. This should fix this issue, can you verify that that's the case?
thanks for the fix and I test with the same vimrc, but It seems not work
Do you get the exact same problem? Where the cursor jumps back? Is this only in the :copen window?
Do you get the exact same problem? Where the cursor jumps back? Is this only in the
:copenwindow?
slightly different. the problem exists still in :copen or floterm window, but this time I press " after visually select a few lines, it quit and switch back to normal mode immediately
Hi I just investigated a little, and here is I found
- floaterm and quickfix may have different reason
- for floaterm, my steps is
<C-\><C-n>->Vjjjj->"->+y, the reason is it go back to terminal mode instead of terminal normal mode, just asvim.api.nvim_win_closewill go back to terminal mode directly, that's why I finally gotgv"+yin the terminal prompt. Cuz the problem does not exist in native nvim terminal, I don't know if it's floterm's problem. - for quickfix, I don't have a collusion yet. The main issue is it will jump back to edit buffer from qf, with 2 situation
- one is during
Vjjjj->", after press", the cursor jump to edit buffer and popup appear there. It seems open window withheight = 25in my environment, when I manually change theheightoption to 10, the popup window appear on top of quick window. - after change
heightto 10, the cursor still jump above, but just after press the specific register key, likeVjjj->"" ->*`
- one is during
I've rewritten the plugin in #68, and also the logic for opening the window. Could you verify if this is still an issue there?
I can't reproduce this in the newest version, so it should be fixed. If that isn't the case please re-open the issue.