Save my state in session #340
Answered
by
orbitalquark
illustrare-opera
asked this question in
Q&A
Replies: 2 comments 4 replies
-
You can connect to `events.SESSION_SAVE` and `events.SESSION_LOAD` to
persist data in a session.
(https://orbitalquark.github.io/textadept/api.html#textadept.session)
Something like this may work:
events.connect(events.SESSION_SAVE, function(session)
session.currentTag = currentTag
end)
events.connect(events.SESSION_LOAD, function(session)
currentTag = session.currentTag
end)
|
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
illustrare-opera
-
Did this work for you? I cannot seem to get the saving part to work? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi.
In my personal init.lua i have:
`local currentTag = 'div'
keys['ctrl+1'] = function()
currentTag = ui.dialogs.input{title = 'Set Current Tag:', text = currentTag}
end`
Any way to persist
currentTag
in session?Assistance greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions