Skip to content

Commit ee37d28

Browse files
committed
fix(spellcheck): accented characters (closes #2250)
1 parent 73bd77e commit ee37d28

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lua/fzf-lua/providers/buffers.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ M.spellcheck = function(opts)
649649
local function trim(s)
650650
return s:gsub("^" .. word_separator .. "+", ""):gsub(word_separator .. "+$", "")
651651
end
652-
from, to = string.find(line, "%w+", from)
652+
from, to = string.find(line, "[^%s^%p^%d^%c^%z]+", from)
653653
local word = from and string.sub(line, from, to) or ""
654654
local prefix = from and string.sub(line, from - 1, from - 1) or ""
655655
local postfix = to and string.sub(line, to + 1, to + 1) or ""
@@ -660,7 +660,7 @@ M.spellcheck = function(opts)
660660
local _, lead = word:find("^" .. word_separator .. "+")
661661
local spell = vim.spell.check(trim(word))[1]
662662
if spell then
663-
cb(string.format("[%s]%s%s:%s:%s\t\t%s",
663+
cb(string.format("[%s]%s%s:%s:%-26s\t\t%s",
664664
utils.ansi_codes[opts.hls.buf_nr](tostring(bufnr0)),
665665
utils.nbsp,
666666
utils.ansi_codes[opts.hls.buf_name](bufname0),

0 commit comments

Comments
 (0)