Skip to content

add writable ShadowCandidate ( text, comment, preedit) #407

Open
shewer wants to merge 2 commits into
hchunhui:masterfrom
shewer:WShadowCandidate
Open

add writable ShadowCandidate ( text, comment, preedit) #407
shewer wants to merge 2 commits into
hchunhui:masterfrom
shewer:WShadowCandidate

Conversation

@shewer

@shewer shewer commented Jun 14, 2025

Copy link
Copy Markdown
Contributor
wscand = WShadowCandidate(cand, type) --  WShadow(cand, type [,text [, comment[,  inherit_comment]]])
wscand:get_dynamic_type()  --> "WShadow"
wscand.text= "test"

wscand.comment = "test_comment"
wscand.preedit = "test_preedit" 
[0][./lua/selector.lua:43] → scand = ShadowCandidate(ctx:get_selected_candidate(), "tt")
7LuaTypeISt10shared_ptrIN4rime9CandidateEEE: 0x614fb89656d8
[0][./lua/selector.lua:43] → scand.text=33
"明"
[0][./lua/selector.lua:43] → scand.text=44
"明"
[0][./lua/selector.lua:43] → scand.comment
""
[0][./lua/selector.lua:43] → scand.comment=333
""
[0][./lua/selector.lua:43] → scand.preedit
"ab     (日月)"
[0][./lua/selector.lua:43] → scand.preedit=333333
"ab     (日月)"
[0][./lua/selector.lua:43] → wscand = WShadowCandidate(ctx:get_selected_candidate(), "tt")
7LuaTypeISt10shared_ptrIN4rime9CandidateEEE: 0x614fb8be37f8
[0][./lua/selector.lua:43] → wscand.text=3
"3"
[0][./lua/selector.lua:43] → wscand.comment=33
"33"
[0][./lua/selector.lua:43] → wscand.preedit=333
"333"

shewer added 2 commits June 14, 2025 21:36
Signed-off-by: shewer <shewer@gmail.com>
Signed-off-by: shewer <shewer@gmail.com>
@hchunhui

Copy link
Copy Markdown
Owner

ShadowCandidate 可写,有可能直接进到 librime 中吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants