Skip to content

Commit

Permalink
fix(lua): 修復默認模式中候選可能重複輸出的問題
Browse files Browse the repository at this point in the history
  • Loading branch information
ksqsf committed Oct 8, 2024
1 parent d12bfcc commit daaa4dc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lua/moran_reorder_filter.lua
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
-- Moran Reorder Filter
-- Copyright (c) 2023, 2024 ksqsf
--
-- Ver: 0.1.2
-- Ver: 0.1.3
--
-- This file is part of Project Moran
-- Licensed under GPLv3
--
-- 0.1.3: 修復一個導致候選重複輸出的 bug。
--
-- 0.1.2: 配合 show_chars_anyway 設置。從 show_chars_anyway 設置起,
-- fixed 輸出有可能出現在 script 之後!此情況只覆寫 comment 而不做重排。
--
Expand Down Expand Up @@ -101,8 +103,9 @@ function Top.DoPhase1(env, fixed_list, smart_list, cand)
table.remove(fixed_list, 1)
end
if #fixed_list == 0 then
for _, cand in ipairs(smart_list) do
for key, cand in ipairs(smart_list) do
yield(cand)
smart_list[key] = nil
end
return 2
end
Expand Down

0 comments on commit daaa4dc

Please sign in to comment.