🪴 a tiny, customizable statusline for neovim
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(utils): match mode based on *first* character with `^` pattern

robin 9dad0784 07d61e9e

+4 -4
+4 -4
lua/lylla/utils.lua
··· 121 121 function utils.get_modehl() 122 122 local mode = vim.api.nvim_get_mode().mode 123 123 124 - if string.match(mode, "n") then 124 + if string.match(mode, "^n") then 125 125 return utils.get_modehl_name("normal") 126 126 end 127 127 128 - if string.match(mode, "[vVs]") then 128 + if string.match(mode, "^[vVs]") then 129 129 return utils.get_modehl_name("visual") 130 130 end 131 131 132 - if string.match(mode, "c") then 132 + if string.match(mode, "^c") then 133 133 return utils.get_modehl_name("command") 134 134 end 135 135 136 - if string.match(mode, "[irRt]") then 136 + if string.match(mode, "^[irRt]") then 137 137 return utils.get_modehl_name("insert") 138 138 end 139 139