Closed polirritmico closed 4 months ago
Describe the bug
In the Doom theme, with some fonts icons, the cursor position isn't aligned with the first character of the menu entry:
To Reproduce
FiraCodeNerdFont-Medium.ttf
nvim -u repro.lua
-- repro.lua local root = vim.fn.fnamemodify("./repro", ":p") for _, name in ipairs({ "config", "data", "state", "cache" }) do vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name end local lazypath = root .. "/plugins/lazy.nvim" if not vim.loop.fs_stat(lazypath) then vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, }) end vim.opt.runtimepath:prepend(lazypath) local plugins = { { "nvimdev/dashboard-nvim", event = "VimEnter", opts = function() local opts = { theme = "doom", config = { header = { "HEADER" }, center = { { action = "ene | startinsert", desc = " Aligned", icon = " ", key = "e", }, { action = "Lazy", desc = " Not aligned", icon = " ", key = "<leader>cl", }, { action = "qa", desc = " Aligned", icon = " ", key = "q" }, }, }, } return opts end, }, } require("lazy").setup(plugins, { root = root .. "/plugins", })
:Dashboard
Not aligned
N
Expected behavior
Correctly align the cursor regardless of the icon used:
System info
Konsole: 23.08.4 Gentoo Linux 2.14 KDE Plasma Version: 5.27.10 KDE Frameworks Version: 5.113.0 Qt Version: 5.15.12 Kernel Version: 6.6.13-gentoo (64-bit)
NVIM v0.9.5 Build type: Release LuaJIT 2.1.0-beta3
Compilation: /usr/bin/x86_64-pc-linux-gnu-gcc -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wvla -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -fno-common -Wno-unused-result -Wimplicit-fallthrough -fdiagnostics-color=always -fstack-protector-strong -DUNIT_TESTING -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -I/usr/include/luajit-2.1 -I/usr/include -I/usr/include -I/var/tmp/portage/app-editors/neovim-0.9.5/work/neovim-0.9.5_build/src/nvim/auto -I/var/tmp/portage/app-editors/neovim-0.9.5/work/neovim-0.9.5_build/include -I/var/tmp/portage/app-editors/neovim-0.9.5/work/neovim-0.9.5_build/cmake.config -I/var/tmp/portage/app-editors/neovim-0.9.5/work/neovim-0.9.5/src -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include
Describe the bug
In the Doom theme, with some fonts icons, the cursor position isn't aligned with the first character of the menu entry:
To Reproduce
FiraCodeNerdFont-Medium.ttf
nvim -u repro.lua
::Dashboard
.Not aligned
entry the cursor should be at the left of the characterN
.Expected behavior
Correctly align the cursor regardless of the icon used:
System info
Konsole: 23.08.4 Gentoo Linux 2.14 KDE Plasma Version: 5.27.10 KDE Frameworks Version: 5.113.0 Qt Version: 5.15.12 Kernel Version: 6.6.13-gentoo (64-bit)
NVIM v0.9.5 Build type: Release LuaJIT 2.1.0-beta3