mirror of
https://github.com/preservim/nerdtree.git
synced 2024-11-23 02:22:37 +08:00
restrict mark names to alphanumeric + underscores
This commit is contained in:
parent
6e60ecfee1
commit
990706b725
|
@ -2771,6 +2771,11 @@ endfunction
|
||||||
" FUNCTION: s:MarkNode(name) {{{2
|
" FUNCTION: s:MarkNode(name) {{{2
|
||||||
" Associate the current node with the given name
|
" Associate the current node with the given name
|
||||||
function! s:MarkNode(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()
|
let currentNode = s:GetSelectedNode()
|
||||||
if currentNode != {}
|
if currentNode != {}
|
||||||
let marks = s:GetMarks()
|
let marks = s:GetMarks()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user