nerdtree

A tree explorer plugin for vim.
Index Commits Files Refs
commit b45f2c27ea95bd9eea756061a37b518f9925b332
parent 6aff1b6cd3f5306a6828e20375cc0fc11cabe590
Author: bravestarr <freasy@gmail.com>
Date:   Thu, 26 Apr 2018 17:13:06 +0800

Replace strcharpart() with substitute() for backward compatibility

Diffstat:
Mlib/nerdtree/bookmark.vim | 2+-
Mlib/nerdtree/path.vim | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/nerdtree/bookmark.vim b/lib/nerdtree/bookmark.vim
@@ -288,7 +288,7 @@ function! s:Bookmark.str()
     let pathStr = self.path.str({'format': 'UI'})
     if strdisplaywidth(pathStr) > pathStrMaxLen
         while strdisplaywidth(pathStr) > pathStrMaxLen && strchars(pathStr) > 0
-            let pathStr = strcharpart(pathStr, 1)
+            let pathStr = substitute(pathStr, '.\{1}', '', '')
         endwhile
         let pathStr = '<' . pathStr
     endif
diff --git a/lib/nerdtree/path.vim b/lib/nerdtree/path.vim
@@ -721,7 +721,7 @@ function! s:Path.str(...)
         let limit = options['truncateTo']
         if strdisplaywidth(toReturn) > limit-1
             while strdisplaywidth(toReturn) > limit-1 && strchars(toReturn) > 0
-                let toReturn = strcharpart(toReturn, 1)
+                let toReturn = substitute(toReturn, '.\{1}', '', '')
             endwhile
             if len(split(toReturn, '/')) > 1
                 let toReturn = '</' . join(split(toReturn, '/')[1:], '/') . '/'