Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undo/redo operation only working for first tab!! #43

Closed
Ravinderjitsidhu opened this issue May 11, 2016 · 4 comments
Closed

undo/redo operation only working for first tab!! #43

Ravinderjitsidhu opened this issue May 11, 2016 · 4 comments

Comments

@Ravinderjitsidhu
Copy link

Ravinderjitsidhu commented May 11, 2016

undo/redo operation only working for first tab... this must be fixed to fulfill the purpose of making tabs

@Ravinderjitsidhu Ravinderjitsidhu changed the title undo/redo operation only working for first tab... it sould fix to fulfill the purpose of making tabs undo/redo operation only working for first tab... this must be fixed to fulfill the purpose of making tabs May 11, 2016
@Ravinderjitsidhu Ravinderjitsidhu changed the title undo/redo operation only working for first tab... this must be fixed to fulfill the purpose of making tabs undo/redo operation only working for first tab!! May 11, 2016
@Ravinderjitsidhu
Copy link
Author

Ravinderjitsidhu commented May 12, 2016

I got solution.
I have found that only first tab was having "undo/redo" working and other tabs were not.
then i found that one node is missing in other tabs :
"editor.ternServer.docs.tab2.doc.$undoManager"
then i got the idea to add undoManager in all the tabs.....and other thing that we can save undoManager stack data in array and can restore on selecting other tab.

to add UndoManager to tab :
editor.getSession().setUndoManager(new ace.UndoManager());

to put undo stack data of current tab in array :
undoStacks[currTabNumber] = editor.getSession().$undoManager;

to restore UndoManager stack data to current tab :
editor.getSession().$undoManager=undoStacks[currTabNumber];

thanks

@Sevin777
Copy link
Owner

Is this bug for Caret-T?

@Ravinderjitsidhu
Copy link
Author

it will produce when you run tabdemo.html

@Sevin777
Copy link
Owner

tabdemo.html is not complete (not even close) and I have no plans for finishing it

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

No branches or pull requests

2 participants