File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -585,8 +585,14 @@ command! InsertNewBullet call <SID>insert_new_bullet()
585
585
" Helper for Colon Indent
586
586
" returns 1 if current line ends in a colon, else 0
587
587
fun ! s: line_ends_in_colon (lnum)
588
- let l: last_char_nr = strgetchar (getline (a: lnum ), strcharlen (getline (a: lnum ))-1 )
589
- return l: last_char_nr == 65306 || l: last_char_nr == 58
588
+ let l: line = getline (a: lnum )
589
+ if exists (" *strcharlen" ) && exists (" *strgetchar" )
590
+ let l: last_char_nr = strgetchar (l: line , strcharlen (l: line )-1 )
591
+ return l: last_char_nr == 65306 || l: last_char_nr == 58
592
+ else
593
+ " Older versions of vim do not support strchar*
594
+ return l: line [strlen (l: line )-1 :] == # ' :'
595
+ endif
590
596
endfun
591
597
" --------------------------------------------------------- }}}
592
598
You can’t perform that action at this time.
0 commit comments