Bug 473639 - Can't use terminal tab while a diff is opened
Summary: Can't use terminal tab while a diff is opened
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: VCS: Git (show other bugs)
Version: 5.11.230403
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Igor Kushnir
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-22 15:22 UTC by Jack Hill
Modified: 2023-09-14 09:02 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.13.231200
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jack Hill 2023-08-22 15:22:55 UTC
SUMMARY
Seems like the VCS module is stealing keyboard control even though the terminal tab is active. (Maybe applies to all tabs - I haven't tested)

STEPS TO REPRODUCE
1. Edit a file that is tracked by git
2. Open "Git Commit" tab (left sidebar)
3. Click on the edited file from this dock (should open the diff)
4. Open the terminal tab (bottom bar)
5. In the terminal press the letter "s"

OBSERVED RESULT
Nothing is entered into the terminal.
Terminal tab is replaced with the "Version Control" tab with the following message:

    /home/jack/Dev/KDE6/src/elisa> git apply --index --cached /tmp/kdevelop.yDrhec
    Command exited with value 128.
    error: patch with only garbage at line 5
    
    Command finished with error UnknownError.

EXPECTED RESULT
Letter "s" is entered into the terminal

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20230821
KDE Plasma Version: 5.27.7
KDE Frameworks Version: 5.109.0
Qt Version: 5.15.10
Kernel Version: 6.4.11-1-default (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION
Comment 1 Igor Kushnir 2023-08-23 11:57:57 UTC
Indeed. The "garbage" error looks like another bug.

Setting the actions' shortcut context to Qt::WidgetShortcut (but not Qt::WidgetWithChildrenShortcut, which KTextEditor view uses for all built-in actions) fixes this issue. I'll create a merge request with this fix soon.
Comment 2 Bug Janitor Service 2023-08-23 13:52:57 UTC
A possibly relevant merge request was started @ https://invent.kde.org/kdevelop/kdevelop/-/merge_requests/477
Comment 3 Igor Kushnir 2023-09-14 09:02:27 UTC
Git commit 90331d9076dbf05cc094a00da3f314abe8e1db04 by Igor Kushnir.
Committed on 14/09/2023 at 11:01.
Pushed by igorkushnir into branch 'master'.

git: restrict diff views' shortcut context
FIXED-IN: 5.13.231200

M  +7    -0    plugins/git/diffviewsctrl.cpp

https://invent.kde.org/kdevelop/kdevelop/-/commit/90331d9076dbf05cc094a00da3f314abe8e1db04