···121121function utils.get_modehl()
122122 local mode = vim.api.nvim_get_mode().mode
123123124124- if string.match(mode, "n") then
124124+ if string.match(mode, "^n") then
125125 return utils.get_modehl_name("normal")
126126 end
127127128128- if string.match(mode, "[vVs]") then
128128+ if string.match(mode, "^[vVs]") then
129129 return utils.get_modehl_name("visual")
130130 end
131131132132- if string.match(mode, "c") then
132132+ if string.match(mode, "^c") then
133133 return utils.get_modehl_name("command")
134134 end
135135136136- if string.match(mode, "[irRt]") then
136136+ if string.match(mode, "^[irRt]") then
137137 return utils.get_modehl_name("insert")
138138 end
139139