Compare commits

...

5 Commits

Author SHA1 Message Date
Martin Grenfell
a856622f0c switch vertion to 2.10.0 2008-06-17 22:58:26 +12:00
Martin Grenfell
ce79c243a3 show how many invalid bookmarks were read 2008-06-17 21:20:56 +12:00
Martin Grenfell
e1b369f34e update header and change license to wtfpl 2008-06-17 21:03:00 +12:00
Martin Grenfell
0a73777381 bugfix for reading files with invalid bookmark syntax 2008-06-16 20:54:28 +12:00
Martin Grenfell
176b551af0 handle invalid bookmarks in bookmarks file 2008-06-16 20:33:17 +12:00
2 changed files with 34 additions and 7 deletions

View File

@@ -33,6 +33,7 @@ CONTENTS *NERDTree-contents*
6.The Author..............................|NERDTreeAuthor| 6.The Author..............................|NERDTreeAuthor|
7.Changelog...............................|NERDTreeChangelog| 7.Changelog...............................|NERDTreeChangelog|
8.Credits.................................|NERDTreeCredits| 8.Credits.................................|NERDTreeCredits|
9.License.................................|NERDTreeLicense|
============================================================================== ==============================================================================
1. Intro *NERDTree* 1. Intro *NERDTree*
@@ -846,6 +847,7 @@ fridge for later ;)
- fixed screen jumping bug with when &scrolloff != 0 - fixed screen jumping bug with when &scrolloff != 0
- fixed some bugs with copying nodes - fixed some bugs with copying nodes
- other random fixes - other random fixes
- change license to wtfpl
2.9.0 2.9.0
@@ -1083,3 +1085,9 @@ set the NERD tree buffers filetype to 'nerdtree'
Thanks to Piotr Czachur for all his suggestions and testing for the bookmarks Thanks to Piotr Czachur for all his suggestions and testing for the bookmarks
feature. feature.
==============================================================================
9. License *NERDTreeLicense*
The NERD tree is released under the wtfpl.
See http://sam.zoy.org/wtfpl/COPYING.

View File

@@ -1,7 +1,16 @@
" vim global plugin that provides a nice tree explorer " ============================================================================
" Last Change: 17 May 2008 " File: NERD_tree.vim
" Description: vim global plugin that provides a nice tree explorer
" Maintainer: Martin Grenfell <martin_grenfell at msn dot com> " Maintainer: Martin Grenfell <martin_grenfell at msn dot com>
let s:NERD_tree_version = '2.10.0rc1' " Last Change: 17 June, 2008
" License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
" Want To Public License, Version 2, as published by Sam Hocevar.
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"
" ============================================================================
let s:NERD_tree_version = '2.10.0'
" SECTION: Script init stuff {{{1 " SECTION: Script init stuff {{{1
"============================================================ "============================================================
@@ -1500,11 +1509,21 @@ function! s:ReadBookmarks()
if filereadable(g:NERDTreeBookmarksFile) if filereadable(g:NERDTreeBookmarksFile)
let bookmarks = s:GetBookmarks() let bookmarks = s:GetBookmarks()
let bookmarkStrings = readfile(g:NERDTreeBookmarksFile) let bookmarkStrings = readfile(g:NERDTreeBookmarksFile)
let invalidBookmarksFound = 0
for i in bookmarkStrings for i in bookmarkStrings
let key = substitute(i, '^\(\w.\{-}\) .*$', '\1', '') let key = substitute(i, '^\(\w\{-}\) .*$', '\1', '')
let path = substitute(i, '^\w.\{-} \(.*\)$', '\1', '') let path = substitute(i, '^\w\{-} \(.*\)$', '\1', '')
try
let bookmarks[key] = s:oPath.New(path) let bookmarks[key] = s:oPath.New(path)
catch /NERDTree.Path.InvalidArguments/
let invalidBookmarksFound += 1
endtry
endfor endfor
if invalidBookmarksFound
call s:Echo(invalidBookmarksFound . " invalid bookmarks were read and discarded")
call s:WriteBookmarks()
endif
endif endif
endfunction endfunction
" Function: s:TreeExistsForTab() {{{2 " Function: s:TreeExistsForTab() {{{2