Currently I'm using the following vim autocmd to show the cursorline only in active pane (i.e. current buffer) as follows.
augroup CursorLine
au!
au VimEnter,WinEnter,BufWinEnter * setlocal cursorline
au WinLeave * setlocal nocursorline
augroup END
But it's also showing cursorline in plugin-related-buffers since it's forcing to set cursorline in current-buffer with WinEnter
. For example, there's cursorline in search box of Telescope Find Files as shown in the picture below.
I tried to hide cursorline just only for Telescope plugin with autocmd VimEnter,WinEnter,BufWinEnter Telescope* setlocal nocursorline
and it doesn't work, cursorline is still appearing.
So, is there any workaround to avoid this issue?
Thanks in advance.
Edit: 1. I just tried an experiment autocmd VimEnter,WinEnter,BufWinEnter NvimTree* setlocal nocursorline
and cursorline in NvimTree plugin has disappeared as I wanted. So, why isn't this working in Telescope?? Or do we need to address the issue in different way??
Edit 2. I just tried using TelescopePrompt
instead of Telescope
and it didn't work.