folke / zen-mode.nvim

🧘 Distraction-free coding for Neovim
Apache License 2.0
1.66k stars 46 forks source link

bug: Netrw window is highlighted when opened from ZenMode #97

Closed nmrnv closed 2 months ago

nmrnv commented 1 year ago

Did you check docs and existing issues?

Neovim version (nvim -v)

v0.6.1

Operating system/version

Ubuntu 22.04.3 LTS

Describe the bug

Whenever I open netrw from ZenMode, it’s highlighted; and if I open it when not in ZenMode, it’s not. Compare the two screenshots:

Highlighted Not Nightlighted
IMG_0524 IMG_0525

Also, as I’m not knowledgable in vimscript, as a solution I want to implement a function to exit ZenMode before opening netrw on e, will you please help me write it? 🙏

nnoremap <Leader>e :call ToggleZenMode()<CR>                                                                       
autocmd FileType netrw nnoremap <buffer><Leader>e :Rex<CR>                                                         

function! ToggleZenMode()                                                                                          
  " if ZenMode                                                                                                     
  "   exit zen mode                                                                                                
  " endif                                                                                                          
  execute ":E"                                                                                                     
endfunction      

Steps To Reproduce

  1. Enter ZenMode
  2. Open netrw with :E
  3. See highlighted window

Expected Behavior

  1. Enter ZenMode
  2. Open netrw with :E
  3. The netrw window is not highlighted.
github-actions[bot] commented 2 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 2 months ago

This issue was closed because it has been stalled for 7 days with no activity.