mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-10 04:13:48 -05:00
Use :mode only in neovim. MacVim still needs to use :redraw! (#1019)
* Use :mode only in neovim. MacVim still needs to use :redraw! * Make nerdtree#redraw do both redraw and redraw! based on a parameter. * Make bang a required parameter. * Replace all redraw statments with call nerdtree#redraw function calls. * Update version in change log.
This commit is contained in:
@@ -22,8 +22,24 @@ endfunction
|
||||
" SECTION: General Functions {{{1
|
||||
"============================================================
|
||||
|
||||
function! nerdtree#slash()
|
||||
"FUNCTION: nerdtree#redraw(bang)
|
||||
" Redraws the screen (Neovim uses the mode statement). If bang is TRUE, use
|
||||
" redraw! instead of redraw.
|
||||
function! nerdtree#redraw(bang)
|
||||
if has('nvim')
|
||||
mode
|
||||
else
|
||||
if a:bang
|
||||
redraw!
|
||||
else
|
||||
redraw
|
||||
endif
|
||||
endif
|
||||
endfunction
|
||||
|
||||
"FUNCTION: nerdtree#slash()
|
||||
" Returns the directory separator based on OS and &shellslash
|
||||
function! nerdtree#slash()
|
||||
if nerdtree#runningWindows()
|
||||
if exists('+shellslash') && &shellslash
|
||||
return '/'
|
||||
@@ -216,7 +232,7 @@ endfunction
|
||||
"Args:
|
||||
"msg: the message to echo
|
||||
function! nerdtree#echo(msg)
|
||||
redraw
|
||||
call nerdtree#redraw(0)
|
||||
echomsg empty(a:msg) ? "" : ("NERDTree: " . a:msg)
|
||||
endfunction
|
||||
|
||||
|
||||
Reference in New Issue
Block a user