[txmt-dev] Split Views Implementation

2015-01-21 Thread Joachim Mårtensson
Nice work,  
I started my own split view branch but nothing ever came out of it, I made it 
too complicated for myself.
I kept separate editor_t context per split view, which added complexity. I had 
an idea that I could extend it to collaborative editing.
I never bothered figuring out the active textview part. And it was horizontal 
split only.

What I liked about my attempt was separate split view state per document. This 
was inspired by Total Finder.
And a close button in the statusbar, if I remember it was somewhat convoluted 
trying to figure out which view to close, since the statusbar belong to the 
view above, but should close the view below.

Anyway here is the link for archeologists: 

I’ll see if I can port some of my ideas.   

Joachim Mårtensson___
textmate-dev mailing list

[txmt-dev] Split Views Implementation

2014-12-31 Thread Steven Clukey
I’ve created an implementation of split views in TextMate. It is basically 
complete, except for one issue that I haven’t been able to fix and I am asking 
for help on this. I am posting it here rather than creating a Pull Request for 
several reasons. First, the known issue can be pretty serious, though it is not 
common in normal use. Second, my commits generally need work (which I 
appreciate, btw) and given the number of commits this may take some time to be 
ready for master. Third, I don’t want the pull request to become like the 
GitHub issue for split views, so I thought it would be better to post it here 
to work on, then when ready for master I’ll submit a Pull Request that can be 
merged quickly.

The usage is fairly simple, there are 4 new options in the View menu to control 
the splitting. The tab bar is global, it shows all the open document and the 
currently active document is highlighted. Selecting a new document in the tab 
bar will change the currently active split to show that document. Closing a 
document closes it from all of the splits that are showing it. The active 
document is changed by clicking inside a document (or menu options in Windows). 
Thats pretty much it.

Now the issue: if there are many documents open and they are closed “too fast 
(holding CMD+W works) then the coherence of the documents is lost and the 
windows may end up in a state where closing “Untitled” opens “Untitled 2”, and 
closing “Untitled 2” opens “Untitled” and the window doesn’t close. Worse yet, 
the splits do not show a new document, they show documents that should have 
already been closed. I believe this is caused by the fact that 
`openAndSelectDocument` is somewhat asynchronous, and “too fast” perhaps means 
that the documents are closed faster than the new documents are open. But, 
since I have not been able to fix this problem perhaps my assessment is wrong.

The implementation is on my fork:

Steven Clukey

textmate-dev mailing list