-
Notifications
You must be signed in to change notification settings - Fork 11
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
vim-coiled-snake breaks vim diff for python files #27
Comments
This comment has been minimized.
This comment has been minimized.
@mikeboiko Will you please try #28 ? Thanks! |
@mikeboiko Please update to master branch... See if it has been fixed.. |
@subnut, I just pulled the master branch and tried again but the problem still exists. |
I am sorry but I am unable to reproduce the bug..... |
No problem, it sounds like the problem may be with my specific .vimrc |
@mikeboiko Many changes were implemented in this plugin the last month.... Try a minimal e.g since you use vim-plug, make a file at your home directory called call plug#begin(vimPlugDir)
Plug 'kalekundert/vim-coiled-snake'
call plug#end() and then start vim with Please report if the problem still occurs |
@kalekundert Can you please check if you can reproduce this issue? I am unable to.. |
@subnut, I haven't gotten to the core of the issue yet. |
I can reproduce something at least similar to this issue. I used files from the
In this case, the
With this setup, I could cause the folds to get out-of-sync (i.e. opening/closing a fold in one split wouldn't affect the other split) by moving the cursor to the right split, then moving it back to the left split. This behavior only happened when the So I do think this is a coiled-snake bug, but I'm still not sure exactly what's going wrong or how to fix it. |
@kalekundert, yea I tested it again with a similar .virmc to the one you posted and I am getting the error. |
I think I figured out what was going on. Basically, the FileType autocommand was being triggered before the |
Also let me know if you have any other problems. I pushed a fairly major change earlier today, and while it works on all the examples I have, it's possible that there will be some regressions. |
Hey @kalekundert, I just tested the latest master commit and this problem has been fixed! |
That's why! 😲 Great find! (I know I should've tested better. I usually do. But my exams were going on....) |
No worries, this was a pretty obscure bug. |
@kalekundert, I did notice another bug when performing diffs with the vim-fugitive plugin. |
Hmm, ok, I'll look into that. I'm not totally surprised, because diff-mode is handled as a little bit of a special case when the plugin starts up, so this sounds like the kind of corner case that might slip through. FYI, the reason this broke is that we changed how coiled snake initializes itself. Previously all of its settings were "buffer local". No need to make a new issue, we can stick with this one. |
Sounds good, thanks @kalekundert |
Yeah.. while making the options window local fixed some issues, it made new issues regarding diff. But atleast we have confidence that we are doing one thing right, keeping window-local things window-local, and not buffer-local. I'm sure that we'll figure out the solution to this problem soon. 👍 EDIT: #5 Was fixed by the above-mentioned change |
lol I know how it is - usually I'm happy if I'm fixing more things than I'm breaking :D |
@kalekundert I just got an idea... let b:coiled_snake_should_fold = 1 And then, whenever we enter a new window, we first check for this variable. If that variable exists, we next check whether |
@mikeboiko I just implemented what I mentioned above in #31. Could you please check whether that fixes this issue? |
This comment has been minimized.
This comment has been minimized.
@subnut, wow I appreciate you working on this so late! I'm in Canada and it's 2:56 PM here. For example this is the output of my error messages
|
@subnut, it works great now! Thank you for your dedication and hard work! |
Whew. Finally! @kalekundert please check if it works on your @mikeboiko thank you for being patient, and @subnut thank you for taking the time to Guess where I live? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@mikeboiko does I ask because in #31 I removed that part of the code that @kalekundert had implemented to make it work. |
@subnut, yep the regular vim diff still works good. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@mikeboiko You have This is expected behaviour for now, because the folding is set/reset when the cursor moves into a window. Do let me know if you have any ideas.. |
This comment has been minimized.
This comment has been minimized.
@mikeboiko I just pushed a new commit on the |
@subnut, yep all the scenarios are working well now. thank you for that! |
@kalekundert and @subnut, it seems that commit 431d705 brought this problem back. |
Thanks for bringing this up. I'll look into it as soon as I can, hopefully this weekend. |
@kalekundert, just wanted to see if you had a chance to look at this yet? Thanks. |
In order to deal with: kalekundert/vim-coiled-snake#27 (comment)
vim-coiled-snake breaks regular vim diff for python files by changing the fold settings
For example, if I run:
vim -d test1.py test2.py
, I initially see a diff with proper foldingIf I move the cursor over from the left pane to the right pane, my folding breaks
As soon as I disable this plugin, everything starts working normal again.
This is my vim version:
I love this plugin - thanks for all the good work!
The text was updated successfully, but these errors were encountered: