C-L mapping breaks netrw refresh
As in title.
I can confirm this.
Adding an autocommand for filetype netrw which adds <Plug>NetrwRefresh to <c-l> as well would be a solution.
Something like
augroup sensible-netrw
autocmd!
autocmd FileType netrw nnoremap <buffer> <silent> <C-L> <Plug>NetrwRefresh:nohlsearch<C-R>=has('diff')?'<Bar>diffupdate':''<CR><CR><C-L>
augroup END
However, this does not work. Only following works
augroup netrw-sensible
autocmd!
autocmd FileType netrw nmap <buffer> <silent> <C-l> <Plug>NetrwRefresh
augroup END
How can I chain <Plug>NetrwRefresh with :nohlsearch<C-R>=has('diff')?'<Bar>diffupdate':''<CR><CR><C-L>?
Except for invoking builtin <C-L> following works
augroup netrw-sensible
autocmd!
autocmd FileType netrw nmap <buffer> <silent> <C-l> <Plug>NetrwRefresh:nohlsearch<C-R>=has('diff')?'<Bar>diffupdate':''<CR><CR>
augroup END
I really don't want to go down the auto-command rabbit hole if it can be avoided. What about augmenting the main map with something like if len(maparg("<Lt>Plug>NetrwRefresh", "n"))|exe "norm \<Lt>Plug>NetrwRefresh"|endif?
What about augmenting the main map with something like if len(maparg("
Plug>NetrwRefresh", "n"))|exe "norm <Lt>Plug>NetrwRefresh"|endif?
Yes, this sounds better than the auto-command.
What is the current solution to this? Would anyone be willing to submit a PR?
This was a bug in Netrw that has since been fixed. I mean, of course it was a bug in Netrw, my bad for not floating that hypothesis to begin with.