kevinhwang91 / nvim-ufo

Not UFO in the sky, but an ultra fold in Neovim.
BSD 3-Clause "New" or "Revised" License
2.16k stars 37 forks source link

Glitch collapsing folds with non ascii characters #163

Closed igorlfs closed 9 months ago

igorlfs commented 9 months ago

Neovim version (nvim -v | head -n1)

NVIM v0.10.0-dev-1174+g5e43a4ce4d

Operating system/version

Linux 6.5.3

How to reproduce the issue

cat mini.lua

-- Use Vim packages install the plugin, also work with some plugins manager such as packer.nvim
vim.o.packpath = '~/.local/share/nvim/site'
vim.cmd('packadd promise-async')
vim.cmd('packadd nvim-ufo')

-- Setting
vim.o.foldcolumn = '1'
vim.o.foldlevel = 99
vim.o.foldlevelstart = -1
vim.o.foldenable = true

local ufo = require('ufo')
ufo.setup()
vim.keymap.set('n', 'zR', ufo.openAllFolds)
vim.keymap.set('n', 'zM', ufo.closeAllFolds)

nvim --clean +'so mini.lua'

  1. Create a sample markdown file, eg,
    - é
    - foobar
  2. Collapse the list on é

Expected behavior

é should be displayed correctly

Actual behavior

Some symbols are shown instead image

igorlfs commented 9 months ago

Thanks for the quick fix!