fzf.vim: Set w:ignore_non_ascii_chars only once

This commit is contained in:
2025-03-03 16:37:41 +01:00
parent 103355478b
commit 459453dc5e

View File

@@ -1,21 +1,22 @@
" vim: set ft=vim.fzf:
let w:ignore_non_ascii_chars = get(w:, 'ignore_non_ascii_chars', '')
" Do not highlight Unicode chars used for the TUI
" Unicode "Box Drawing" block
let w:ignore_non_ascii_chars ..= '\u2500-\u257f'
" Unicode "Block Elements" block
let w:ignore_non_ascii_chars ..= '\u2580-\u259f'
" Unicode "Block elements" subblock of the "Symbols for Legacy Computing" block
" (i.e. 1/8th block symbols)
let w:ignore_non_ascii_chars ..= '\U0001fb70-\U0001fb89'
" Braille symbols for spinner
let w:ignore_non_ascii_chars ..= '⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏'
" ellipsis and wrap sign for long lines
let w:ignore_non_ascii_chars ..= '·↳'
" Line endings
let w:ignore_non_ascii_chars ..= '␍␊'
" Do not highlight Unicode chars used by the fzf TUI. For this ignore the:
"
" - Unicode "Box Drawing" block
" - Unicode "Block Elements" block
" - Unicode "Block elements" subblock of the "Symbols for Legacy Computing"
" block (i.e. 1/8th block symbols)
" - Braille symbols for spinner
" - Ellipses and wrap signs for long lines
" - Line ending indicators
let w:ignore_non_ascii_chars =
\ get(w:, 'ignore_non_ascii_chars', '') ..
\ '\u2500-\u257f' ..
\ '\u2580-\u259f' ..
\ '\U0001fb70-\U0001fb89' ..
\ '⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏' ..
\ '·↳' ..
\ '␍␊'
" Update after changes
call HighlightNonASCIIChars()