Nerdtree: Scroll down issue with putty

Created on 4 Feb 2012  路  7Comments  路  Source: preservim/nerdtree

I'm not sure this is a bug but when I use vim inside putty on windows, scrolling down with the scroll wheel opens a new split with the file under the cursor. Scrolling up works without a problem. I should also mention that everything works when using Ubuntu's terminal, or gvim, or iterm2 on Mac. So it could be just a putty issue. This is weird because scrolling both up and down works ok inside vim and active file window. I only have this issue when scrollIng down inside the active nerdtree window.
Can someone offer me some advice regarding this?

Most helpful comment

I found a fix for this issue if anyone still cares....

in the autoload/nerdtree.vim do the following.
comment out line 64 which looks like this

call NERDTreeAddKeyMap({ 'key': '<MiddleRelease>', 'scope': "all", 'callback': s."handleMiddleMouse" })

make it look like this

"call NERDTreeAddKeyMap({ 'key': '<MiddleRelease>', 'scope': "all", 'callback': s."handleMiddleMouse" })

Now the scrolling will work.... but you can't middle click to select anything. Obviously I could care less to since scrolling is much more important.

Enjoy.

All 7 comments

Not sure exactly what is going on here, other than that it appears to be a problem with either putty or your vim setup in relation to putty.

The middle mouse button and the 'i' key (by default) are the keys that open the current file in a new split - so it looks like somehow scrolling down is sending one of those to vim or vim is misinterpreting what is being sent. This could be due to your term setting in vim.

Unfortunately I dont currently have a windows machine to test on - otherwise id get your vim config off you and try to reproduce it :(

Getting similar error:
Before the files start opening in split windows though, when I first open vim, I see the following error message when I try to scroll down.

Error detected while processing function nerdtree#invokeKeyMap..233..67..20_handleMiddleMouse:
line 8:
E117: Unknown function: nerdtree#openExplorer

I found a fix for this issue if anyone still cares....

in the autoload/nerdtree.vim do the following.
comment out line 64 which looks like this

call NERDTreeAddKeyMap({ 'key': '<MiddleRelease>', 'scope': "all", 'callback': s."handleMiddleMouse" })

make it look like this

"call NERDTreeAddKeyMap({ 'key': '<MiddleRelease>', 'scope': "all", 'callback': s."handleMiddleMouse" })

Now the scrolling will work.... but you can't middle click to select anything. Obviously I could care less to since scrolling is much more important.

Enjoy.

Similar problem happening in gvim for windows. Started happening out of nowhere when trying to open a file from the tree. Shows the error, asks to continue and opens up a blank file

Typing :cd after blank file opens, it tells me i am in the default loading directory

I am experiencing the same thing with putty. Across xterm-256color, screen-256color, RHEL5 and ubuntu 11.10 with latest nerdtree. Other than this, nerd tree is awesome!

I have trouble with this also, is it possible to have mvim clear clipboard first before opening the file?
I keep getting E21: Cannot make changes, 'modifiable' is off when there is something on mac clipboard.

(prior to upgrading to 4.20, i was also getting that in mvim, but the middle mouse would split open the file)

FYI for those who still have this problem, "acidtonic" 's fix still works, however it must now be applied to the following file: autoload/nerdtree/ui_glue.vim

Was this page helpful?
0 / 5 - 0 ratings