File tree Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -4308,23 +4308,25 @@ function s:RegexpParser.parse_regexp()
4308
4308
endif
4309
4309
elseif ntoken == # ' \^'
4310
4310
" '^' is only magic as the very first character.
4311
- if prevtoken !=# ' ' && prevtoken !=# ' \&' && prevtoken !=# ' \|' && prevtoken !=# ' \n' && prevtoken !=# ' \(' && prevtoken !=# ' \%('
4311
+ if self .reg_magic != self .RE_VERY_MAGIC && prevtoken !=# ' ' && prevtoken !=# ' \&' && prevtoken !=# ' \|' && prevtoken !=# ' \n' && prevtoken !=# ' \(' && prevtoken !=# ' \%('
4312
4312
let ntoken = ' ^'
4313
4313
endif
4314
4314
elseif ntoken == # ' \$'
4315
4315
" '$' is only magic as the very last character
4316
4316
let pos = self .reader.tell ()
4317
- while ! self .isend (self .reader.peek ())
4318
- let [t , n ] = self .get_token ()
4319
- " XXX: Vim doesn't check \v and \V?
4320
- if n == # ' \c' || n == # ' \C' || n == # ' \m' || n == # ' \M' || n == # ' \Z'
4321
- continue
4322
- endif
4323
- if n !=# ' \|' && n !=# ' \&' && n !=# ' \n' && n !=# ' \)'
4324
- let ntoken = ' $'
4325
- endif
4326
- break
4327
- endwhile
4317
+ if self .reg_magic != self .RE_VERY_MAGIC
4318
+ while ! self .isend (self .reader.peek ())
4319
+ let [t , n ] = self .get_token ()
4320
+ " XXX: Vim doesn't check \v and \V?
4321
+ if n == # ' \c' || n == # ' \C' || n == # ' \m' || n == # ' \M' || n == # ' \Z'
4322
+ continue
4323
+ endif
4324
+ if n !=# ' \|' && n !=# ' \&' && n !=# ' \n' && n !=# ' \)'
4325
+ let ntoken = ' $'
4326
+ endif
4327
+ break
4328
+ endwhile
4329
+ endif
4328
4330
call self .reader.seek_set (pos)
4329
4331
elseif ntoken == # ' \?'
4330
4332
" '?' is literal in '?' command.
You can’t perform that action at this time.
0 commit comments