1
0
mirror of https://github.com/amix/vimrc synced 2025-07-27 23:45:00 +08:00

Change Rainbow-parenthese plugin into Rainbow plugin.

This commit is contained in:
Kurtis Moxley
2022-08-11 11:57:20 +08:00
parent bbbedb5311
commit 1f4af09835
53 changed files with 2745 additions and 845 deletions

View File

@ -39,6 +39,35 @@ function! coc#string#reflow(lines, width) abort
return empty(lines) ? [''] : lines
endfunction
function! coc#string#content_height(lines, width) abort
let len = 0
for line in a:lines
if strwidth(line) <= a:width
let len = len + 1
else
let currlen = 0
for part in split(line, '\<\|\>\|\ze\s')
let w = strwidth(part)
if currlen + w >= a:width
if currlen + w == a:width
let len = len + 1
let currlen = 0
else
let len = len + (a:width + w)/a:width
let currlen = w%a:width
endif
else
let currlen = currlen + w
endif
endfor
if currlen > 0
let len = len + 1
endif
endif
endfor
return len == 0 ? 1 : len
endfunction
" get change between two lines
function! coc#string#diff(curr, previous, col) abort
let end = strpart(a:curr, a:col - 1)