kevin, thanks for your help!
The code changes as follows, No flicker, But the code is a little long, and there might be an easier way
about Ctrl+Q:
about Alt+Q:
The code changes as follows, No flicker, But the code is a little long, and there might be an easier way
about Ctrl+Q:
,int cp=SendMessage(sci SCI.SCI_GETCURRENTPOS 0 0)
,int line=SendMessage(sci SCI.SCI_LINEFROMPOSITION cp 0)
,
,int Start=SendMessage(sci SCI.SCI_POSITIONFROMLINE line 0)
,SendMessage(sci SCI.SCI_SETTARGETSTART Start 0)
,
,int End=SendMessage(sci SCI.SCI_GETLINEENDPOSITION line 0)
,SendMessage(sci SCI.SCI_SETTARGETEND End 0)
,
,int length=End-Start
,SendMessage(sci SCI.SCI_GETCURLINE length+1 _s.all(length 2))
,
,SendMessage sci SCI.SCI_REPLACETARGET 0 0
,
,_s-"//"
,SendMessage(sci SCI.SCI_INSERTTEXT Start _s)
,SendMessage(sci SCI.SCI_LINEEND 0 0)
about Alt+Q:
,cp=SendMessage(sci SCI.SCI_GETCURRENTPOS 0 0)
,line=SendMessage(sci SCI.SCI_LINEFROMPOSITION cp 0)
,
,lineStart=SendMessage(sci SCI.SCI_POSITIONFROMLINE line 0)
,SendMessage(sci SCI.SCI_SETTARGETSTART lineStart 0)
,
,lineEnd=SendMessage(sci SCI.SCI_GETLINEENDPOSITION line 0)
,SendMessage(sci SCI.SCI_SETTARGETEND lineEnd 0)
,
,SendMessage sci SCI.SCI_REPLACETARGET 0 0
,
,_s="hello world"
,SendMessage(sci SCI.SCI_INSERTTEXT lineStart _s)
,SendMessage(sci SCI.SCI_LINEEND 0 0)