Shougo / defx.nvim

:file_folder: The dark powered file explorer implementation for neovim/Vim8
MIT License
1.17k stars 86 forks source link

numbers column behaviour on focus #267

Closed arthur-s closed 4 years ago

arthur-s commented 4 years ago

Warning: I will close the issue without the minimal init.vim and the reproduction instructions.

Problems summary

On nvim, when I open defx, I don't see the numbes column, see image: https://ibb.co/qncCv7j

Then if I switch focus from terminal to another program on my desktop, e.g. I open web browser, then again switch back to terminal, I can see numbers appeared: https://ibb.co/d4fLDs0 on vim8 numbers doesn't appear at all.

Expected

numbers columns should always be displayed when defx open.

Environment Information

Provide a minimal init.vim/vimrc with less than 50 lines (Required!)

" Your minimal init.vim/vimrc

set tabstop=4                     " tab is 4 spaces [2]
set shiftwidth=4
set softtabstop=4
set expandtab

set nocompatible
set encoding=utf-8
set hidden
filetype plugin indent on
syntax on
set synmaxcol=2048                " Don't syntax highlight super-long lines (for performance)

set autoindent                    " automatically indent lines and try to do it intelligently
set backspace=indent,eol,start    " backspace behaves 'normally'

set smartindent

set virtualedit=all               " Allow the cursor to go in to 'invalid' places

set hlsearch                      " highlight search terms
set incsearch                     " search incrementally
set ignorecase                    " ignore case in searches...
set smartcase                     " ...but not really. Case sensitive if capitals are included.
set wrapscan                      " Set the search scan to wrap around the file

set foldmethod=indent
set nofoldenable
set foldnestmax=5
set foldlevel=1
set scl=auto " return the signcolumn to the default behaviour

set colorcolumn=119
set termguicolors
set listchars=tab:>-,trail:~,extends:>,precedes:<
set list

set mouse=a
set nopaste

set rnu
augroup numbertoggle
  autocmd!
  " also InsertLeave, InsertEnter
  autocmd BufEnter,FocusGained,WinEnter * set nonu rnu
  autocmd BufLeave,FocusLost,WinLeave   * set nu nornu
augroup END

if has('nvim')
    call plug#begin('~/.local/share/nvim/plugged')
else
    call plug#begin('~/.vim/plugged')
endif

Plug 'roxma/nvim-yarp'
if !has('nvim')
    Plug 'roxma/vim-hug-neovim-rpc'
endif

Plug 'Shougo/defx.nvim'
call plug#end()

The reproduce ways from neovim/Vim starting (Required!)

  1. open terminal, open nvim there
  2. open web browser
  3. back to terminal.
Shougo commented 4 years ago

Fixed.