Summary: | View difference does not work | ||
---|---|---|---|
Product: | [Applications] kate | Reporter: | Dmitri Koulikoff <kde> |
Component: | general | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | christoph, dr.steven.carlos+kbugs, jf.mundox, loh.tar |
Priority: | NOR | ||
Version First Reported In: | 21.08.0 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/utilities/kate/commit/8368a6833b5c03b8e3d6b5c815c6accb566740e4 | Version Fixed In: | 21.12.0 |
Sentry Crash Report: | |||
Attachments: |
Image of changed file diff
kdiff is not opening the main window is disabled |
Description
Dmitri Koulikoff
2021-08-18 09:14:17 UTC
Created attachment 140923 [details]
Image of changed file diff
It appears to work on my computer.
I created the file, opened it in vim and changed it, then went back to kate.
SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.22.4
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.2
Kernel Version: 5.13.12-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i5-8265U CPU @ 1.60GHz
Memory: 7.6 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620
Created attachment 140937 [details]
kdiff is not opening
After further investigation, I found that uninstalling kompare opened a file, but installing it again opened the graphical viewer. (In reply to DrCarlos from comment #3) > After further investigation, I found that uninstalling kompare opened a > file, but installing it again opened the graphical viewer. I have kompare installed. It seems the problem is with the settings. (In reply to Dmitri Koulikoff from comment #4) > (In reply to DrCarlos from comment #3) > > After further investigation, I found that uninstalling kompare opened a > > file, but installing it again opened the graphical viewer. > > I have kompare installed. It seems the problem is with the settings. In any case, if kate cannot open kompare, there must be a clear message with the reason. And a suggestion, how to fix. Not work too. Operating System: Arch Linux kate and kompare Version: 21.08.01 without kdiff and meld kate open a new empty file (path: /tmp/tmp/kate.XXXXXX ), and there is a diff file (path: /tmp/kate.XXXXXX ) that should be opened by kompare. I try to restore changes(in following commits) in kate/katemwmodonhddialog.cpp in 340..355 lines, then it appears to work. https://invent.kde.org/utilities/kate/-/commit/edefa27760adc151d400c932ed88d5d942571080 https://invent.kde.org/utilities/kate/-/commit/3c0b2e30c9a6b133bfcd24e7ef3d4466da0031f7 https://invent.kde.org/utilities/kate/-/commit/a4f4008559488d6dbd433d0efa75798df575119f Indeed, it seems like the only problem is that it's trying to open the file in the wrong path (/tmp/tmp/ instead of just /tmp/). Everything else is fine (i.e. the diff is generated correctly and can be opened manually with kompare). Git commit 495b62303529c83fca002ec19ebbb62219a99d15 by Christoph Cullmann. Committed on 03/10/2021 at 19:43. Pushed by cullmann into branch 'master'. fix view differences fileName() already returns the full file name including the path for QTemporaryFile M +1 -1 kate/katemwmodonhddialog.cpp https://invent.kde.org/utilities/kate/commit/495b62303529c83fca002ec19ebbb62219a99d15 Git commit 5207354363159c254efbce6f4fcad466e72f4ae5 by Christoph Cullmann. Committed on 09/10/2021 at 21:21. Pushed by cullmann into branch 'lsp2clipboard'. fix view differences fileName() already returns the full file name including the path for QTemporaryFile M +1 -1 kate/katemwmodonhddialog.cpp https://invent.kde.org/utilities/kate/commit/5207354363159c254efbce6f4fcad466e72f4ae5 Instead of opening Kompare it opens a diff file. Yes, but that works as designed. If you want to view the diff in some external application, you can just go to File->Open With. The current implementation works properly even if no external diff viewer is installed. Perhaps we should query common diff tools for availability and use them if there, but that would be some new feature somebody would need to provide some patch for. Help is welcome, see https://kate-editor.org/join-us/ (In reply to Christoph Cullmann from comment #11) > Yes, but that works as designed. > If you want to view the diff in some external application, you can just go > to File->Open With. > The current implementation works properly even if no external diff viewer is > installed. > > Perhaps we should query common diff tools for availability and use them if > there, but that would be some new feature somebody would need to provide > some patch for. Help is welcome, see https://kate-editor.org/join-us/ I use Kate for decades and it always was opening diffs in an external application. Why did you break this behaviour? I insist, the diff MUST be opened in Kompare. (In reply to Dmitri Koulikoff from comment #12) > (In reply to Christoph Cullmann from comment #11) > > Yes, but that works as designed. > > If you want to view the diff in some external application, you can just go > > to File->Open With. > > The current implementation works properly even if no external diff viewer is > > installed. > > > > Perhaps we should query common diff tools for availability and use them if > > there, but that would be some new feature somebody would need to provide > > some patch for. Help is welcome, see https://kate-editor.org/join-us/ > > I use Kate for decades and it always was opening diffs in an external > application. Why did you break this behaviour? I insist, the diff MUST be > opened in Kompare. You can insist, but if you don't either provide a patch or convince somebody to implement it for you, this will stay as is. The behavior was altered in https://bugs.kde.org/show_bug.cgi?id=436906 That Kate only opens this itself now was some side-effect perhaps nobody thought about. Perhaps you can ask the author of the patch nicely if he wants to improve on it. (In reply to Christoph Cullmann from comment #13) > (In reply to Dmitri Koulikoff from comment #12) > > (In reply to Christoph Cullmann from comment #11) > > > Yes, but that works as designed. > > > If you want to view the diff in some external application, you can just go > > > to File->Open With. No, I can not. Since the main window is disabled during the examinations of the changes. > You can insist, but if you don't either provide a patch or convince somebody > to implement it for you, this will stay as is. Do you ask me to provide a revert of the changes that had broken the behaviour? Just revert what the commit(s). > The behavior was altered in https://bugs.kde.org/show_bug.cgi?id=436906 The bug 436906 is about something completely different. > That Kate only opens this itself now was some side-effect perhaps nobody > thought about. Created attachment 145538 [details]
the main window is disabled
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/1174 Git commit 8368a6833b5c03b8e3d6b5c815c6accb566740e4 by Christoph Cullmann, on behalf of Waqar Ahmed. Committed on 30/03/2023 at 17:39. Pushed by cullmann into branch 'master'. Use internal diff view in KateMWonHDDialog It now uses git to calculate the difference and then shows it in our own diff viewer. M +39 -74 apps/lib/katemwmodonhddialog.cpp M +1 -5 apps/lib/katemwmodonhddialog.h https://invent.kde.org/utilities/kate/commit/8368a6833b5c03b8e3d6b5c815c6accb566740e4 |