chore: clean code

This commit is contained in:
Mirtle
2026-03-26 17:52:31 +08:00
parent 17a04afe39
commit ff1da70fbd
7 changed files with 11 additions and 15 deletions

View File

@@ -28,7 +28,7 @@ function select.func(key, env)
local selected_candidate = context:get_selected_candidate()
selected_candidate = selected_candidate and selected_candidate.text or input
local selected_char = ""
local selected_char
if (key:repr() == env.first_key) then
selected_char = selected_candidate:sub(1, utf8.offset(selected_candidate, 2) - 1)
elseif (key:repr() == env.last_key) then