nerdtree/autoload
Jason Franklin c934b50c0d Repair the broken middle mouse click handler
Issues #597, #642, and #650 all report problems with the NERDTree
handler function for middle mouse clicks. In all cases, the problems
arose from the use of a function that didn't exist and from the use
of a bad argument in the call to the "g:NERDTreeAddKeyMap" function.
The fix for the first problem is obvious, but the solution to the
second bug merits explanation.

Previously, middle click events in the NERDTree window were
triggered with the "<MiddleRelease>" Vim key code. Since
"<MiddleMouse>" is always triggered before "<MiddleRelease>", The
error in #642 was bound to occur (because of the default behavior
for middle mouse clicks). Thus, the problem was easily solved by
using "<MiddleMouse>" instead of "<MiddleRelease>" in the mapping.

As an enhancement, I added the trigger of a "<LeftMouse>" event as
the first command in the handler function. This will cause the
middle click to reposition the cursor below the pointer before
continuing with its normal behavior. The benefits of this are clear.

This mapping has no defined behavior for bookmarks. Unless an issue
is raised to address this, it will be left just so for now.

Fixes #597, fixes #642, and fixes #650.
2017-06-19 17:28:41 -04:00
..
nerdtree Repair the broken middle mouse click handler 2017-06-19 17:28:41 -04:00
nerdtree.vim Reimplement the bookmark comparison method 2017-05-26 13:23:05 -04:00