conf: option name: single_char -> search_single_char close #664
This commit is contained in:
parent
c9d8255352
commit
f12eaa27d0
@ -44,7 +44,7 @@ switches:
|
|||||||
reset: 1
|
reset: 1
|
||||||
- name: full_shape
|
- name: full_shape
|
||||||
states: [ 半角, 全角 ]
|
states: [ 半角, 全角 ]
|
||||||
- name: single_char # search.lua 的功能开关,辅码查词时是否单字优先
|
- name: search_single_char # search.lua 的功能开关,辅码查词时是否单字优先
|
||||||
abbrev: [词, 单]
|
abbrev: [词, 单]
|
||||||
states: [正常, 单字]
|
states: [正常, 单字]
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ switches:
|
|||||||
reset: 1
|
reset: 1
|
||||||
- name: full_shape
|
- name: full_shape
|
||||||
states: [ 半角, 全角 ]
|
states: [ 半角, 全角 ]
|
||||||
- name: single_char # search.lua 的功能开关,辅码查词时是否单字优先
|
- name: search_single_char # search.lua 的功能开关,辅码查词时是否单字优先
|
||||||
abbrev: [词, 单]
|
abbrev: [词, 单]
|
||||||
states: [正常, 单字]
|
states: [正常, 单字]
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ switches:
|
|||||||
reset: 1
|
reset: 1
|
||||||
- name: full_shape
|
- name: full_shape
|
||||||
states: [ 半角, 全角 ]
|
states: [ 半角, 全角 ]
|
||||||
- name: single_char # search.lua 的功能开关,辅码查词时是否单字优先
|
- name: search_single_char # search.lua 的功能开关,辅码查词时是否单字优先
|
||||||
abbrev: [词, 单]
|
abbrev: [词, 单]
|
||||||
states: [正常, 单字]
|
states: [正常, 单字]
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ switches:
|
|||||||
reset: 1
|
reset: 1
|
||||||
- name: full_shape
|
- name: full_shape
|
||||||
states: [ 半角, 全角 ]
|
states: [ 半角, 全角 ]
|
||||||
- name: single_char # search.lua 的功能开关,辅码查词时是否单字优先
|
- name: search_single_char # search.lua 的功能开关,辅码查词时是否单字优先
|
||||||
abbrev: [词, 单]
|
abbrev: [词, 单]
|
||||||
states: [正常, 单字]
|
states: [正常, 单字]
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ switches:
|
|||||||
reset: 1
|
reset: 1
|
||||||
- name: full_shape
|
- name: full_shape
|
||||||
states: [ 半角, 全角 ]
|
states: [ 半角, 全角 ]
|
||||||
- name: single_char # search.lua 的功能开关,辅码查词时是否单字优先
|
- name: search_single_char # search.lua 的功能开关,辅码查词时是否单字优先
|
||||||
abbrev: [词, 单]
|
abbrev: [词, 单]
|
||||||
states: [正常, 单字]
|
states: [正常, 单字]
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ switches:
|
|||||||
reset: 1
|
reset: 1
|
||||||
- name: full_shape
|
- name: full_shape
|
||||||
states: [ 半角, 全角 ]
|
states: [ 半角, 全角 ]
|
||||||
- name: single_char # search.lua 的功能开关,辅码查词时是否单字优先
|
- name: search_single_char # search.lua 的功能开关,辅码查词时是否单字优先
|
||||||
abbrev: [词, 单]
|
abbrev: [词, 单]
|
||||||
states: [正常, 单字]
|
states: [正常, 单字]
|
||||||
|
|
||||||
|
11
lua/search.lua
Normal file → Executable file
11
lua/search.lua
Normal file → Executable file
@ -1,10 +1,9 @@
|
|||||||
-- search.lua
|
|
||||||
-- 拼音辅码查询
|
|
||||||
-- Copyright (C) Mirtle <mirtle.cn@outlook.com>
|
-- Copyright (C) Mirtle <mirtle.cn@outlook.com>
|
||||||
-- Distributed under terms of the MIT license.
|
-- [CC BY 3.0 DEED](https://creativecommons.org/licenses/by/3.0/deed)
|
||||||
-- select_notifier 逻辑取自 AuxFilter
|
|
||||||
|
|
||||||
-- 使用说明:<https://github.com/mirtlecn/rime-radical-pinyin/search.lua.md>
|
-- 使用说明:<https://github.com/mirtlecn/rime-radical-pinyin/blob/master/search.lua.md>
|
||||||
|
|
||||||
|
-- 感谢 [AuxFilter](https://github.com/HowcanoeWang/rime-lua-aux-code/blob/main/lua/aux_code.lua) 提供参考
|
||||||
|
|
||||||
local function alt_lua_punc(s)
|
local function alt_lua_punc(s)
|
||||||
if s then
|
if s then
|
||||||
@ -173,7 +172,7 @@ function f.func(input, env)
|
|||||||
end
|
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
|
local dict_table
|
||||||
if f.if_schema_lookup then
|
if f.if_schema_lookup then
|
||||||
|
@ -32,7 +32,7 @@ switches:
|
|||||||
reset: 1
|
reset: 1
|
||||||
- name: full_shape
|
- name: full_shape
|
||||||
states: [ 半角, 全角 ]
|
states: [ 半角, 全角 ]
|
||||||
- name: single_char # search.lua 的功能开关,辅码查词时是否单字优先
|
- name: search_single_char # search.lua 的功能开关,辅码查词时是否单字优先
|
||||||
abbrev: [词, 单]
|
abbrev: [词, 单]
|
||||||
states: [正常, 单字]
|
states: [正常, 单字]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user