@@ -62,6 +62,10 @@ if !exists('g:bullets_max_alpha_characters')
6262 let g: bullets_max_alpha_characters = 2
6363end
6464
65+ if ! exists (' g:bullets_enable_roman_list' )
66+ let g: bullets_enable_roman_list = 1
67+ end
68+
6569" calculate the decimal equivalent to the last alphabetical list item
6670let s: power = g: bullets_max_alpha_characters
6771let s: abc_max = -1
@@ -211,6 +215,10 @@ endfun
211215
212216
213217fun ! s: match_roman_list_item (input_text)
218+ if g: bullets_enable_roman_list == 0
219+ return {}
220+ endif
221+
214222 let l: rom_bullet_regex = join ([
215223 \ ' \v\C' ,
216224 \ ' ^(' ,
@@ -632,8 +640,14 @@ command! InsertNewBullet call <SID>insert_new_bullet()
632640" Helper for Colon Indent
633641" returns 1 if current line ends in a colon, else 0
634642fun ! s: line_ends_in_colon (lnum)
635- let l: last_char_nr = strgetchar (getline (a: lnum ), strcharlen (getline (a: lnum ))-1 )
636- return l: last_char_nr == 65306 || l: last_char_nr == 58
643+ let l: line = getline (a: lnum )
644+ if exists (" *strcharlen" ) && exists (" *strgetchar" )
645+ let l: last_char_nr = strgetchar (l: line , strcharlen (l: line )-1 )
646+ return l: last_char_nr == 65306 || l: last_char_nr == 58
647+ else
648+ " Older versions of vim do not support strchar*
649+ return l: line [strlen (l: line )-1 :] == # ' :'
650+ endif
637651endfun
638652" --------------------------------------------------------- }}}
639653
0 commit comments