Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Missing escape() for '*'

It's escaped the first time it's used, but not the second time, causing
a regex error for the string '**'.
  • Loading branch information...
commit f11ca11cd6caff828c890e6fe058cb0dc9f84c61 1 parent f4c550e
@AndrewRadev AndrewRadev authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  autoload/rubycomplete.vim
View
2  autoload/rubycomplete.vim
@@ -149,7 +149,7 @@ function! s:GetRubyVarType(v)
let ctors = ctors.'\)'
let fstr = '=\s*\([^ \t]\+.' . ctors .'\>\|[\[{"''/]\|%[xwQqr][(\[{@]\|[A-Za-z0-9@:\-()\.]\+...\?\|lambda\|&\)'
- let sstr = ''.a:v.'\>\s*[+\-*/]*'.fstr
+ let sstr = ''.escape(a:v, '*').'\>\s*[+\-*/]*'.fstr
let [lnum,lcol] = searchpos(sstr,'nb',stopline)
if lnum != 0 && lcol != 0
let str = matchstr(getline(lnum),fstr,lcol)
Please sign in to comment.
Something went wrong with that request. Please try again.