-
Notifications
You must be signed in to change notification settings - Fork 2
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
Dialog for saving conflicting changes from context file editor #402
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #402 +/- ##
==========================================
+ Coverage 75.59% 75.65% +0.06%
==========================================
Files 35 35
Lines 5912 6137 +225
==========================================
+ Hits 4469 4643 +174
- Misses 1443 1494 +51 ☔ View full report in Codecov by Sentry. |
Thanks Thomas, it looks good and worked fine from my side my only observations are:
Apart from that, LGTM |
It's definitely installed on Maxwell, and I think it's probably the most likely graphical diff viewer to be installed on a random Linux system. We could make it configurable, or have a list of different ones to try, but I'm inclined to keep things simple until it becomes an issue. Meld has been pretty reliable from what I remember of it, but it's possible it could crash. Any error output would be visible in the terminal where you launched DAMNIT.
Yup, good idea. 🙂
That's true. I don't think there's really a good way to avoid that, but if we let Python create the tempfile in the default |
Since #304, the context file editor periodically checks the file for changes and reloads the context file as long as you don't have any unsaved changes locally. This PR checks the file on disk when you try to save, and if it has changed, it tells you this and gives you options to deal with it:
Clicking 'View changes' opens a diff viewer (meld) to compare the file on disk (left) with your editor (right). You can pull changes across either way and save the files from there. When you close this view, any changes you saved on the right go back into the editor view.
I also wrapped the editor
setText()
method to restore the approximate scroll position when we reload the editor contents. This isn't super smart, but for small edits it works quite nicely, and I'm hoping it's strictly better than jumping up to the top.