scrooloose/nerdtree — Issue #128: NERDTree raises error when opening a file that is already opened and modified
Author: jsherer
Created: 2012-01-30 14:34:26+00:00
State: open

I'm getting a strange error when using NERDTree to navigate to a file that is already opened in a buffer and which has also been modified. Here's the message I receive:

Error detected while processing function 32_KeyMap_Invoke..32..31..32_activateFileNode..56..75..118..119..136:
line 1:
E37: No write since last change (add ! to override)

Steps to reproduce:

1. Open a directory to edit that has at least two files in it. This will open NERDTree.
* Using NERDTree, open the first file in that directory by highlighting the node and pressing the enter/return key or 'o'.
* Modify the file you opened. Do not write your changes.
* Using NERDTree, open the second file in that directory by highlighting the node and pressing the enter/return key or 'o'.
* Using NERDTree, re-open the first file in that directory by highlighting the node and pressing the enter/return key or 'o'. At this point NERDTree will complain.

I'm assuming this is directly related to opening the file in a window/buffer that already has been modified. The issue does not occur if you open the file in a split or a new tab.