Skip to content

E704 when opening nerdtree or new directory #968

Closed
@Coleej

Description

@Coleej

With the newest commit, when I toggle Nerdtree or navigate to a new directory, Vim throws this error:

E704: Funcref variable name must start with a capital: l:numChildrenCached

The directory is not populated with any other nodes. I reverted back to commit: '288669db1fa888947deaf715d7469233f476909f' and the problem disappeared.

Environment

  • Operating System: Linux, both ubuntu 18.04 (4.18 kernel) and Arch (5.0.4 kernel)

  • Vim version :version:

Included patches: 1-547
Compiled by cjohnson@mobile
Huge version with GTK2-GNOME GUI.  Features included (+) or not (-):
+acl               +clientserver      +diff              +folding           +libcall           -mouse_gpm         +packages          -ruby              +termguicolors     +visual            +xsmp_interact
+arabic            +clipboard         +digraphs          -footer            +linebreak         -mouse_jsbterm     +path_extra        +scrollbind        +terminal          +visualextra       +xterm_clipboard
+autocmd           +cmdline_compl     +dnd               +fork()            +lispindent        +mouse_netterm     -perl              +signs             +terminfo          +viminfo           -xterm_save
+autochdir         +cmdline_hist      -ebcdic            +gettext           +listcmds          +mouse_sgr         +persistent_undo   +smartindent       +termresponse      +vreplace
+autoservername    +cmdline_info      +emacs_tags        -hangul_input      +localmap          -mouse_sysmouse    +postscript        +startuptime       +textobjects       +wildignore
+balloon_eval      +comments          +eval              +iconv             -lua               +mouse_urxvt       +printer           +statusline        +timers            +wildmenu
+balloon_eval_term +conceal           +ex_extra          +insert_expand     +menu              +mouse_xterm       +profile           -sun_workshop      +title             +windows
+browse            +cryptv            +extra_search      +job               +mksession         +multi_byte        -python            +syntax            +toolbar           +writebackup
++builtin_terms    +cscope            +farsi             +jumplist          +modify_fname      +multi_lang        +python3/dyn       +tag_binary        +user_commands     +X11
+byte_offset       +cursorbind        +file_in_path      +keymap            +mouse             -mzscheme          +quickfix          +tag_old_static    +vartabs           -xfontset
+channel           +cursorshape       +find_in_path      +lambda            +mouseshape        +netbeans_intg     +reltime           -tag_any_white     +vertsplit         +xim
+cindent           +dialog_con_gui    +float             +langmap           +mouse_dec         +num64             +rightleft         -tcl               +virtualedit       +xpm
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/local/stow/vim81-0547/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.
0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/
glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16 -D_REENTRANT -DORBIT2=1 -pthread -I/usr/include/libgnomeui-2.
0 -I/usr/include/gnome-keyring-1 -I/usr/include/libbonoboui-2.0 -I/usr/include/libxml2 -I/usr/include/libgnome-2.0 -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/orbit-2.0 -I/usr/
include/libgnomecanvas-2.0 -I/usr/include/gail-1.0 -I/usr/include/libart-2.0 -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pang
o-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/f
reetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/x86_64-linux-gnu/gnome-vfs-2.0/include -I/usr/include/gconf/2 -I/usr/include/dbus-1.0
-I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include   -O3 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc   -L/usr/local/lib -Wl,--as-needed -o vim   -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -
lfreetype  -lgnomeui-2 -lSM -lICE -lbonoboui-2 -lgnome-2 -lpopt -lbonobo-2 -lbonobo-activation -lORBit-2 -lgnomecanvas-2 -lart_lgpl_2 -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgio-2.0 -lpang
oft2-1.0 -lpango-1.0 -lfontconfig -lfreetype -lgdk_pixbuf-2.0 -lgnomevfs-2 -lgconf-2 -lgthread-2.0 -lgmodule-2.0 -lgobject-2.0 -lglib-2.0 -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE  -lm -ltinfo -lnsl  -lselinu
x  -ldl```

* NERDTree version `git rev-parse --short HEAD`: 0efbdfb

* NERDTree settings applied in your vimrc, if any:
```" << NERDTree >> {{{

let g:NERDTreeWinSize = 52
au bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
" function to open NERDTree depending on filetype
"au vimenter * call s:CheckToOpenNERDTree()

function! s:CheckToOpenNERDTree() abort

	" Open for python
	if &filetype == 'python'
		NERDTree
	endif

	" Open for c
	if &filetype == 'c'
		NERDTree
	endif

endfunction

" user NERDTree when opening directory
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | endif

" }}}```


### Process
<!--- List the steps that will recreate the issue. -->

1. open nerdtree or navigate to new directory

### Current Result
error is thrown and no nodes are loaded into the tree

### Expected Result
navigate directory tree

### Screenshot(s)

### Possible Fix
revert to commit '288669db1fa888947deaf715d7469233f476909f'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions