Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Last line edited in a QM-Editor item
#1
I wonder whether any information regarding the last line edited in a QM-item is stored somewhere. It might be extremely useful in the case of long files, inasmuch as there is frequently a need to browse between items. I am thinking about using an indirect way to locate it by using a sequence of "undo" - "redo" but (a) it is not elegant and (b) this information is lost whenever you exit QM. Any advice will be appreciated.

This is my approach, that I do not like :

Function GoToLastLineEdited
Code:
Copy      Help
str si.getmacro(getopt(itemid) 1)
str caller.getmacro(getopt(itemid 1) 1);err    caller=si
if ideb; min 0; err out "<>%s : <open ''%s /%i''>%s</open> - Called by : %s" NowT si _error.place si caller

Acc a.Find(_hwndqm "PUSHBUTTON" "Undo    Ctrl+Z" "class=ToolbarWindow32[]id=2053" 0x1005 1)
err
,_s=F"{_error.description} : <c 172>Info</c> - Caller : <open>{caller}</open> "
,min 0; err out "<>%s : <open ''%s /%i''>%s</open> - %s" NowT si _error.place si _s
,mac "Warning_QM" si 0
,end
str statestring

int state=a.State(statestring)
if(state&STATE_SYSTEM_UNAVAILABLE)
,_s=F"<c 255>Option unavailable</c>   - Caller : <open>{caller}</open> "
,min 0; err out "<>%s : <open ''%s /%i''>%s</open> - %s" NowT si _error.place si _s
,mac "Warning_QM" si 0
,end
else
,key Cz          ;; Ctrl+Z
,key Cy          ;; Ctrl+Y
,
,
#2
All Undo data is managed by the Scintilla code edit control, I even don't know how it does it. And it does not have API to retrieve the Undo history or the caret position history.
#3
Thank you for your prompt - as always - answer. I would like to ask another, relevant to this issue question : When one saves a qm-item is it likely that there exists a trigger, to monitor this action. If not, is there any way to trigger when clicking on the QM save button?
#4
No triggers. QM saves in many places, not only when clicking the Save button.


Forum Jump:


Users browsing this thread: 6 Guest(s)