File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -576,8 +576,18 @@ function! GetPythonPEPFormat(lnum, count)
576
576
let l: pos_start_string =
577
577
\ s: SearchPosWithSkip (' .' , ' bcW' , s: skip_string , a: lnum )
578
578
call winrestview (l: better_orig_breakpointview )
579
- " Use single or double quote corresponding with start of string
580
- if getline (a: lnum )[l: pos_start_string [1 ]] == # ' "'
579
+ " Find the type of start quote of the string
580
+ " and skip charactars at the start of the string like b/u/r
581
+ let l: extra_chars = 0
582
+ let l: cur_char = getline (a: lnum )[l: pos_start_string [1 ]]
583
+ while l: cur_char !=# ' "' && l: cur_char !=# " '"
584
+ let l: extra_chars += 1
585
+ let l: cur_char = getline (a: lnum )[l: pos_start_string [1 ]
586
+ \ + l: extra_chars ]
587
+ endwhile
588
+
589
+
590
+ if l: cur_char == # ' "'
581
591
call feedkeys (" a\" \<CR> \" \<esc> " , ' n' )
582
592
else
583
593
call feedkeys (" a'\<CR> '\<esc> " , ' n' )
You can’t perform that action at this time.
0 commit comments