diff --git a/double_pinyin.schema.yaml b/double_pinyin.schema.yaml index 1cc996c..84f34df 100644 --- a/double_pinyin.schema.yaml +++ b/double_pinyin.schema.yaml @@ -44,7 +44,7 @@ switches: reset: 1 - name: full_shape states: [ 半角, 全角 ] - - name: single_char # search.lua 的功能开关,辅码查词时是否单字优先 + - name: search_single_char # search.lua 的功能开关,辅码查词时是否单字优先 abbrev: [词, 单] states: [正常, 单字] diff --git a/double_pinyin_abc.schema.yaml b/double_pinyin_abc.schema.yaml index 6aef038..42da69e 100644 --- a/double_pinyin_abc.schema.yaml +++ b/double_pinyin_abc.schema.yaml @@ -44,7 +44,7 @@ switches: reset: 1 - name: full_shape states: [ 半角, 全角 ] - - name: single_char # search.lua 的功能开关,辅码查词时是否单字优先 + - name: search_single_char # search.lua 的功能开关,辅码查词时是否单字优先 abbrev: [词, 单] states: [正常, 单字] diff --git a/double_pinyin_flypy.schema.yaml b/double_pinyin_flypy.schema.yaml index 49de764..b3702a7 100644 --- a/double_pinyin_flypy.schema.yaml +++ b/double_pinyin_flypy.schema.yaml @@ -44,7 +44,7 @@ switches: reset: 1 - name: full_shape states: [ 半角, 全角 ] - - name: single_char # search.lua 的功能开关,辅码查词时是否单字优先 + - name: search_single_char # search.lua 的功能开关,辅码查词时是否单字优先 abbrev: [词, 单] states: [正常, 单字] diff --git a/double_pinyin_mspy.schema.yaml b/double_pinyin_mspy.schema.yaml index a5762d6..2e3571c 100644 --- a/double_pinyin_mspy.schema.yaml +++ b/double_pinyin_mspy.schema.yaml @@ -44,7 +44,7 @@ switches: reset: 1 - name: full_shape states: [ 半角, 全角 ] - - name: single_char # search.lua 的功能开关,辅码查词时是否单字优先 + - name: search_single_char # search.lua 的功能开关,辅码查词时是否单字优先 abbrev: [词, 单] states: [正常, 单字] diff --git a/double_pinyin_sogou.schema.yaml b/double_pinyin_sogou.schema.yaml index 14e6541..4a75994 100644 --- a/double_pinyin_sogou.schema.yaml +++ b/double_pinyin_sogou.schema.yaml @@ -44,7 +44,7 @@ switches: reset: 1 - name: full_shape states: [ 半角, 全角 ] - - name: single_char # search.lua 的功能开关,辅码查词时是否单字优先 + - name: search_single_char # search.lua 的功能开关,辅码查词时是否单字优先 abbrev: [词, 单] states: [正常, 单字] diff --git a/double_pinyin_ziguang.schema.yaml b/double_pinyin_ziguang.schema.yaml index 7f57dc6..b0dfca3 100644 --- a/double_pinyin_ziguang.schema.yaml +++ b/double_pinyin_ziguang.schema.yaml @@ -44,7 +44,7 @@ switches: reset: 1 - name: full_shape states: [ 半角, 全角 ] - - name: single_char # search.lua 的功能开关,辅码查词时是否单字优先 + - name: search_single_char # search.lua 的功能开关,辅码查词时是否单字优先 abbrev: [词, 单] states: [正常, 单字] diff --git a/lua/search.lua b/lua/search.lua old mode 100644 new mode 100755 index 2512f72..abbcc22 --- a/lua/search.lua +++ b/lua/search.lua @@ -1,10 +1,9 @@ --- search.lua --- 拼音辅码查询 -- Copyright (C) Mirtle --- Distributed under terms of the MIT license. --- select_notifier 逻辑取自 AuxFilter +-- [CC BY 3.0 DEED](https://creativecommons.org/licenses/by/3.0/deed) --- 使用说明: +-- 使用说明: + +-- 感谢 [AuxFilter](https://github.com/HowcanoeWang/rime-lua-aux-code/blob/main/lua/aux_code.lua) 提供参考 local function alt_lua_punc(s) if s then @@ -173,7 +172,7 @@ function f.func(input, env) end -- 查字时是否单字优先 - local if_single_char_first = env.engine.context:get_option("single_char") + local if_single_char_first = env.engine.context:get_option("search_single_char") local dict_table if f.if_schema_lookup then diff --git a/rime_ice.schema.yaml b/rime_ice.schema.yaml index d209156..88e4897 100644 --- a/rime_ice.schema.yaml +++ b/rime_ice.schema.yaml @@ -32,7 +32,7 @@ switches: reset: 1 - name: full_shape states: [ 半角, 全角 ] - - name: single_char # search.lua 的功能开关,辅码查词时是否单字优先 + - name: search_single_char # search.lua 的功能开关,辅码查词时是否单字优先 abbrev: [词, 单] states: [正常, 单字]