File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,12 @@ rime_api.get_shared_data_dir= function()
7878 return '/usr/shared/rime-data'
7979end
8080--]]
81- local function Version ()
81+ local function Version (env )
82+ if type (env ) == " table" and env .engine then
83+ if env .engine .context .composition :toSegmentation ().get_segments then
84+ return 215
85+ end
86+ end
8287 local ver
8388 if Opencc and Opencc (' s2t.json' ).convert_word then
8489 return 200
@@ -159,15 +164,15 @@ end
159164
160165---- - rime_api tools
161166
162- local function Ver_info ()
167+ local function Ver_info (env )
163168 local msg1 = rime_api .get_user_id and string.format (" %s %s %s (id:%s) " ,
164169 rime_api .get_distribution_name (),
165170 rime_api .get_distribution_code_name (),
166171 rime_api .get_distribution_version (),
167172 rime_api .get_user_id ()) or " "
168173
169174 local msg2 = string.format (" Ver: librime %s librime-lua %s lua %s" ,
170- rime_api .get_rime_version () , Version () ,_VERSION )
175+ rime_api .get_rime_version () , Version (env ) ,_VERSION )
171176
172177 return msg1 .. msg2
173178end
You can’t perform that action at this time.
0 commit comments