Skip to content
Myr

Fix `incompatible encoding regexp match` from width call

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent c3676bf · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:fzf+1 added-1 removed
419 unmodified lines
420421 if RUBY_VERSION.split('.').map { |e| e.rjust(3, '0') }.join > '001009'422 @@wrx = Regexp.new '\p{Han}|\p{Katakana}|\p{Hiragana}|\p{Hangul}'423 def width str424 str.gsub(@@wrx, ' ').length424 str.gsub(@@wrx, ' ').length rescue str.length425 end426427 def trim str, len, left428 width = width str
482 unmodified lines