atg / chocolat-public

Public bug tracker for the private chocolat project
http://chocolatapp.com
180 stars 4 forks source link

Jumping to files doesn’t maintain scroll position #1623

Closed jbrennan closed 8 years ago

jbrennan commented 10 years ago
  1. Open a file, scroll to a certain place.
  2. Open another file, make an edit.
  3. Use Cmd+D to go back to your previous file.

Expected: You should be at the same insertion point / scroll location you were when you left the file. Actual: Who knows! Usually you’re scrolled somewhere else.

Reproducible: Frequently enough to make Chocolat a pain to use regularly. This bug has been around forever.

locks commented 10 years ago

This is one of those bugs that's really hard to replicate and debug, hence it being longstanding.

jcbsv commented 9 years ago

I experience this bug constantly (literally in every project), it's quite annoying. Though, I don't use Cmd+D to move between files, I just click the filename in the list Active files. I have to move the cursor one character to get the editor to scroll to the right position. I've tried to clear the Application Settings and perform a complete re-install, but it didn't resolve the problem. How can I help you to nail this bug?

jbrennan commented 9 years ago

Yep, still a problem in the latest Chocolat on Yosemite. What can I provide to help fix this issue? It's starting to become a dealbreaker and I'd love to help fix it.

johnmap commented 9 years ago

Still happening. It's not intermittent for me - happens every file switch in every project. I'm happy to give any and all info that will help you fix this sort-of showstopping bug.

atg commented 9 years ago

One way to reproduce this is to open up two active files, then scroll to the bottom of one (making sure the cursor isn't visible), then switch to file B, then switch back to file A.

I don't know why this happens though.

johnmap commented 8 years ago

Still happening in 3.2.1

=/

atg commented 8 years ago

Yes, I know :P

So I added some logging and as far as I can tell, Chocolat is not attempting to set the scroll position of active files. Which makes sense, because they stay open, so theoretically they shouldn't need it.

Edit: I have fixed a bug, but it's still not working yet.

atg commented 8 years ago

Basically the problem is that RBSplitView really doesn't like the way we use it, and so I will have to write my own split view.

johnmap commented 8 years ago

I'm not familiar with Cocoa, but that doesn't sound fun.

But I'm extremely excited that you're at least looking at this again - thank you! :)

atg commented 8 years ago

Yeah it's very not fun, and I'm not sure whether it will fix it either. But it has to be done.

There are so many hax to make the current split view work, it's clouding out the code so I can't understand what's going on. On the plus side, this will solve some of the other split view problems that have been in chocolat forever.

Edit: Nice!

screen shot 2016-01-29 at 00 44 08
atg commented 8 years ago

Done! https://gist.github.com/fileability/3574f652b0a19272f77c

atg commented 8 years ago

As far as I can tell, this is fixed! :grinning: If this issue is still a problem after 3.2.2 hits, please comment on this issue or open a new one.