From 990706b72518f7f387afcefc1a1750a23df24cf7 Mon Sep 17 00:00:00 2001 From: Martin Grenfell Date: Fri, 6 Jun 2008 23:33:01 +1200 Subject: [PATCH] restrict mark names to alphanumeric + underscores --- plugin/NERD_tree.vim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim index db1308d..46f8819 100644 --- a/plugin/NERD_tree.vim +++ b/plugin/NERD_tree.vim @@ -2771,6 +2771,11 @@ endfunction " FUNCTION: s:MarkNode(name) {{{2 " Associate the current node with the given name function! s:MarkNode(name) + if a:name !~ '^[0-9a-zA-Z_]*$' + call s:Echo("Marks must be named using numbers, letters and underscores only") + return + endif + let currentNode = s:GetSelectedNode() if currentNode != {} let marks = s:GetMarks()