<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -985,7 +985,7 @@ endfunction
 &quot;gets the line number of the root node
 function! s:TreeFileNode.GetRootLineNum()
     let rootLine = 1
-    while getline(rootLine) !~ '^/'
+    while getline(rootLine) !~ '^\(/\|&lt;\)'
         let rootLine = rootLine + 1
     endwhile
     return rootLine
@@ -2898,8 +2898,10 @@ endfunction
 function! s:getPath(ln)
     let line = getline(a:ln)
 
+    let rootLine = s:TreeFileNode.GetRootLineNum()
+
     &quot;check to see if we have the root node
-    if line =~ '^\/'
+    if a:ln == rootLine
         return b:NERDTreeRoot.path
     endif
 
@@ -2923,7 +2925,6 @@ function! s:getPath(ln)
         let curFile = substitute(curFile, '/\?$', '/', &quot;&quot;)
     endif
 
-
     let dir = &quot;&quot;
     let lnum = a:ln
     while lnum &gt; 0
@@ -2932,8 +2933,8 @@ function! s:getPath(ln)
         let curLineStripped = s:stripMarkupFromLine(curLine, 1)
 
         &quot;have we reached the top of the tree?
-        if curLine =~ '^/'
-            let dir = substitute (curLine, ' *$', &quot;&quot;, &quot;&quot;) . dir
+        if lnum == rootLine
+            let dir = b:NERDTreeRoot.path.str({'format': 'UI'}) . dir
             break
         endif
         if curLineStripped =~ '/$'
@@ -3132,7 +3133,13 @@ function! s:renderView()
     call cursor(line(&quot;.&quot;)+1, col(&quot;.&quot;))
 
     &quot;draw the header line
-    call setline(line(&quot;.&quot;)+1, b:NERDTreeRoot.path.str({'format': 'UI'}))
+    let header = b:NERDTreeRoot.path.str({'format': 'UI'})
+    let wid = winwidth(0)
+    if len(header) &gt; wid
+        let header = &quot;&lt;&quot; . strpart(header, len(header) - wid + 1)
+    endif
+
+    call setline(line(&quot;.&quot;)+1, header)
     call cursor(line(&quot;.&quot;)+1, col(&quot;.&quot;))
 
     &quot;draw the tree</diff>
      <filename>plugin/NERD_tree.vim</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>08bc9870bce29e59422e652a0f56ca0a6a3ac80c</id>
    </parent>
  </parents>
  <author>
    <name>marty</name>
    <email>martin_grenfell@msn.com</email>
  </author>
  <url>http://github.com/scrooloose/nerdtree/commit/a713a86f0662dc6ca405384dd8a5df35c8b91a6a</url>
  <id>a713a86f0662dc6ca405384dd8a5df35c8b91a6a</id>
  <committed-date>2009-11-04T16:49:36-08:00</committed-date>
  <authored-date>2009-11-04T16:49:36-08:00</authored-date>
  <message>truncate the root line if its too long

and by &quot;too long&quot; i mean wider than the nerdtree window</message>
  <tree>f6904e413a3c2dba7b55da3c3212c0ecf5f85ccb</tree>
  <committer>
    <name>marty</name>
    <email>martin_grenfell@msn.com</email>
  </committer>
</commit>
