1. ZyX_I
  2. aurum

Commits

ZyX_I  committed ed8eee5

Fixed escaping in some cases

  • Participants
  • Parent commits 6ee487a
  • Branches default

Comments (0)

Files changed (3)

File ftplugin/aurumannotate.vim

View file
  • Ignore whitespace
             execute 'edit '.fnameescape('aurum://diff:'.epath.':'.
                         \               rev1.':'.rev2.':'.
                         \               ((a:0&&a:1)?(''):(escape(bvar.file,
-                        \                                        '\:*?['))))
+                        \                                        '\;:'))))
         endif
     elseif a:action is# 'open'
         if a:0 && a:1

File ftplugin/aurumgraphlog.vim

View file
  • Ignore whitespace
         let cmd='edit '.fnameescape('aurum://diff:'.epath.'::'.hex)
         if has_key(bvar.opts, 'files') && !has_key(bvar.opts.ignorefiles,'diff')
             let cmd.=fnameescape(':'.join(map(copy(bvar.opts.files),
-                        \                 'escape(v:val, "\\,:;")'), ';'))
+                        \                 'escape(v:val, "\\:;")'), ';'))
         endif
     "▶3 other: view commit diff
     else
     let bvar=s:_r.aurum.bufvars[bufnr('%')]
     let cs=bvar.repo.changesets[hex]
     let epath=escape(bvar.repo.path, ':\')
+    let efile=escape(file, '\;:')
     if a:0 && a:1
         return s:F.cwin().":edit ".
-                    \fnameescape('aurum://diff:'.epath.':'.hex.'::'.file)."\n"
+                    \fnameescape('aurum://diff:'.epath.':'.hex.'::'.efile)."\n"
     else
         return s:F.cwin().":edit ".
-                    \fnameescape('aurum://diff:'.epath.'::'.hex.':'.file)."\n"
+                    \fnameescape('aurum://diff:'.epath.'::'.hex.':'.efile)."\n"
     endif
 endfunction
 "▶1 vimdiff
     let opts=s:_r.aurum.encodeopts(bvar.opts)
     let epath=escape(bvar.repo.path, ':\')
     return ':edit '.fnameescape('aurum://glog:'.epath.':'.opts.
-                \               'files:'.escape(file, ':\*?[').','.
+                \               'files:'.escape(file, ';,:\*?[').','.
                 \               'crrestrict:files')."\n"
 endfunction
 "▶1 AuGlog mapping group

File plugin/aurum.vim

View file
  • Ignore whitespace
 "▶3 comm.globtopattern :: glob → pattern
 function s:F.comm.globtopattern(glob)
     " XXX If more metacharacters will be supported, they must be added to 
-    " escape() calls in s:F.filehistory and s:F.runmap in ftplugin/aurumannotate
+    " escape() calls in s:F.filehistory in ftplugin/aurumgraphlog
     return '\V\^'.substitute(substitute(substitute(substitute(substitute(
                 \substitute(substitute(substitute(substitute(substitute(a:glob,
                 \'\v\\(.)', '\="\\{".char2nr(submatch(1))."}"', 'g'),