Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Retrieve position from insert statement
#2
Function GetQmCodeEditorCaretPositionBeforeInsertingText
Code:
Copy      Help
;/
function# [flags] ;;flags: 1 go to that position

int c=GetQmCodeEditor
SendMessage(c SCI.SCI_UNDO 0 0)
int r=SendMessage(c SCI.SCI_GETCURRENTPOS 0 0)
SendMessage(c SCI.SCI_REDO 0 0)
if(flags&1) SendMessage(c SCI.SCI_GOTOPOS r 0)
ret r

;https://www.scintilla.org/ScintillaDoc.html

test
Macro Macro349
Code:
Copy      Help
str s=
;one
;two
;three

InsertStatement s
int r=GetQmCodeEditorCaretPositionBeforeInsertingText(1)
out r


#ret
mmmmmmm


Messages In This Thread
RE: Retrieve position from insert statement - by Gintaras - 03-30-2019, 05:09 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)