-
Notifications
You must be signed in to change notification settings - Fork 7
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
Opening multiple threads breaks global $messages/$cur_thread #3
Comments
Hmmm, |
I just pushed the part that moves those variables inside VIM::Buffer: |
Interesting. Thanks a lot Franz!! I do think you are right, we should just refactor the code and pull out a .rb file too while we are at it. I'm travelling right now and won't be done until Friday so I won't be around too much. |
I made you a contributor to this repo. |
Make them members of VIM::Buffer. First part of a fix for issue #3.
I applied your change to master here. I'm going to do some refactoring, basically just pulling out the a .rb file for now. I figured I'd get your stuff in before that so you could continue in peace. |
I commited a fix for issues with multiple nmshow buffers I also discovered a conflict in Message end markers. It's always set to $curbuf.count, so one behind the actual end. get_message() assumed end to be the last line of the, message and probably there are even more places. If you don't mind I will got and set it (in rb_show) to b.count-1). (also affects full_headers_start etc.) |
Just a little follow-up: @imain what do you think about the approach for giving reoccuring operations like "is folded" or "unfold and align on top" a name (ruby function)? |
@ff2000 I'm not even sure what you mean to be honest :). If it fixes the problem I'm all for it. Great work on the latest changes btw, I just did a pull and am very happy with the changes! |
You can
to reproduce the issue. Type ":ruby print $cur_thread" in the vim command entry, switch to another notmuch-show buffer and print the threadid again - they will be the same ;)
Before the addition of folding this was not realized, but with folding vim totally get's screwed up, takes minutes to navigate between long threads, vim constantly at 100% CPU.
For a first quick fix I think making some of the global variables members of VIM::Buffer would be agood idea. I will prepare a patch if there are no objections.
In the long run IMHO refactoring a little bit (OOP?) might make the whole code more readable.
The text was updated successfully, but these errors were encountered: