Skip to content

Commit

Permalink
fix(util): properly escape breakat (#4597)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cnly committed Apr 10, 2023
1 parent 628f08a commit 43f4daa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autoload/coc/string.vim
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ endfunction
" Used when 'wrap' and 'linebreak' is enabled
function! coc#string#content_height(lines, width) abort
let len = 0
let pattern = empty(&breakat) ? '.\zs' : '['.substitute(&breakat, '\([\[\]]\)', '\\\1', 'g').']\zs'
let pattern = empty(&breakat) ? '.\zs' : '['.substitute(&breakat, '\([\[\]\-]\)', '\\\1', 'g').']\zs'
for line in a:lines
if strwidth(line) <= a:width
let len += 1
Expand Down

0 comments on commit 43f4daa

Please sign in to comment.