@@ -561,19 +561,25 @@ function! s:convertRegep(input) "{{{
561
561
" 2. migemo
562
562
" 3. smartsign
563
563
" 4. smartcase
564
- let re = s: should_use_regexp () ? a: input : s: escape_regexp_char (a: input )
564
+ let use_migemo = s: should_use_migemo (a: input )
565
+ let re = use_migemo || s: should_use_regexp () ? a: input : s: escape_regexp_char (a: input )
565
566
566
567
" Convert space to match only start of spaces
567
568
if re == # ' '
568
569
let re = ' \s\+'
569
570
endif
570
571
571
- if s: should_use_migemo ( a: input )
572
+ if use_migemo
572
573
let re = s: convertMigemo (re )
573
574
endif
574
575
575
576
if s: should_use_smartsign (a: input )
576
- let re = s: convertSmartsign (a: input )
577
+ let r = s: convertSmartsign (a: input )
578
+ if use_migemo
579
+ let re = re . ' \m\|' . r
580
+ else
581
+ let re = r
582
+ endif
577
583
endif
578
584
579
585
let case_flag = EasyMotion#helper#should_case_sensitive (
@@ -593,10 +599,7 @@ function! s:convertMigemo(re) "{{{
593
599
if ! has_key (s: migemo_dicts , &l: encoding )
594
600
let s: migemo_dicts [&l: encoding ] = EasyMotion#helper#load_migemo_dict ()
595
601
endif
596
- if re = ~# ' ^\a$'
597
- let re = get (s: migemo_dicts [&l: encoding ], re , a: re )
598
- endif
599
- return re
602
+ return get (s: migemo_dicts [&l: encoding ], re , a: re )
600
603
endfunction " }}}
601
604
function ! s: convertSmartsign (chars) " {{{
602
605
" Convert given chars to smartsign string
@@ -641,7 +644,7 @@ function! s:should_use_regexp() "{{{
641
644
return g: EasyMotion_use_regexp == 1 && s: flag .regexp == 1
642
645
endfunction " }}}
643
646
function ! s: should_use_migemo (char) " {{{
644
- if ! g: EasyMotion_use_migemo || match (a: char , ' \A ' ) != -1
647
+ if ! g: EasyMotion_use_migemo || match (a: char , ' [^!-~] ' ) != -1
645
648
return 0
646
649
endif
647
650
0 commit comments