Skip to content

Commit

Permalink
fix: wrong preedit of escape_filter results
Browse files Browse the repository at this point in the history
  • Loading branch information
amorphobia committed Oct 15, 2024
1 parent ae81c0b commit 7399000
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions schema/lua/jiandao/escape_filter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ local function filter(input)
local text = string.gsub(cand.text, "\\n", "\n")
text = string.gsub(text, "\\t", "\t")
text = string.gsub(text, "\\\\", "\\")
local comment = cand:get_genuine().comment
yield(Candidate(cand.type, cand._start, cand._end, text, comment))
new_cand = Candidate(cand.type, cand._start, cand._end, text, cand.comment)
new_cand.preedit = cand.preedit
yield(new_cand)
end
end

Expand Down

0 comments on commit 7399000

Please sign in to comment.