We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4ed0785 + 9f50afc commit 448ad2aCopy full SHA for 448ad2a
1 file changed
plugin/bullets.vim
@@ -585,8 +585,14 @@ command! InsertNewBullet call <SID>insert_new_bullet()
585
" Helper for Colon Indent
586
" returns 1 if current line ends in a colon, else 0
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
+ let l:line = getline(a:lnum)
+ 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
596
endfun
597
" --------------------------------------------------------- }}}
598
0 commit comments