Bug 450515 - Unable to select from or paste to GDB TUI
Summary: Unable to select from or paste to GDB TUI
Status: RESOLVED NOT A BUG
Alias: None
Product: konsole
Classification: Applications
Component: copy-paste (show other bugs)
Version: 21.12.2
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-18 13:00 UTC by Paul Fee
Modified: 2022-02-22 15:00 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
attachment-1431-0.html (2.56 KB, text/html)
2022-02-18 13:51 UTC, tcanabrava
Details
Screenshot of Konsole mouse settings (95.21 KB, image/png)
2022-02-21 15:23 UTC, Paul Fee
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Fee 2022-02-18 13:00:00 UTC
SUMMARY
***
When GDB is in TUI mode, konsole selection and middle mouse button pasting is no longer available
***


STEPS TO REPRODUCE
1. Launch GDB
2. Switch to TUI mode (press CTRL-X followed by A)
3. Try to highlight/select text - doesn't work.
4. Try to paste with middle mouse button - doesn't work.
5. Exit TUI mode (press CTRL-X followed by A)
6. Selection and middle mouse paste work once more.

OBSERVED RESULT
GDB puts the terminal in a different mode (perhaps using the ncurses library).  Selection and pasting worked with previous versions of konsole.  I'm not sure which version first broke this existing functionality, I'd estimate it was working six months ago.

EXPECTED RESULT
Selection and pasting should work in GDB TUI, just like it does in "normal" mode.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: openSUSE Tumbleweed
(available in About System)
KDE Plasma Version: 5.24.0
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Running X.Org display (not Wayland).
Comment 1 tcanabrava 2022-02-18 13:51:30 UTC
Created attachment 146913 [details]
attachment-1431-0.html

Please verify that your settings on konsole allows for mouse tracking on
the application.
try to disable the mouse tracking.

On Fri, Feb 18, 2022 at 2:00 PM Paul Fee <bugzilla_noreply@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=450515
>
>             Bug ID: 450515
>            Summary: Unable to select from or paste to GDB TUI
>            Product: konsole
>            Version: 21.12.2
>           Platform: openSUSE RPMs
>                 OS: Linux
>             Status: REPORTED
>           Severity: normal
>           Priority: NOR
>          Component: copy-paste
>           Assignee: konsole-devel@kde.org
>           Reporter: paul.f.fee@gmail.com
>   Target Milestone: ---
>
> SUMMARY
> ***
> When GDB is in TUI mode, konsole selection and middle mouse button pasting
> is
> no longer available
> ***
>
>
> STEPS TO REPRODUCE
> 1. Launch GDB
> 2. Switch to TUI mode (press CTRL-X followed by A)
> 3. Try to highlight/select text - doesn't work.
> 4. Try to paste with middle mouse button - doesn't work.
> 5. Exit TUI mode (press CTRL-X followed by A)
> 6. Selection and middle mouse paste work once more.
>
> OBSERVED RESULT
> GDB puts the terminal in a different mode (perhaps using the ncurses
> library).
> Selection and pasting worked with previous versions of konsole.  I'm not
> sure
> which version first broke this existing functionality, I'd estimate it was
> working six months ago.
>
> EXPECTED RESULT
> Selection and pasting should work in GDB TUI, just like it does in "normal"
> mode.
>
> SOFTWARE/OS VERSIONS
> Linux/KDE Plasma: openSUSE Tumbleweed
> (available in About System)
> KDE Plasma Version: 5.24.0
> KDE Frameworks Version: 5.90.0
> Qt Version: 5.15.2
>
> ADDITIONAL INFORMATION
> Running X.Org display (not Wayland).
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
Comment 2 Ahmad Samir 2022-02-18 14:53:08 UTC
This is due to a change in gdb upstream, starting from 11.1, https://www.sourceware.org/gdb/news/ :
Mouse actions are now supported. The mouse wheel scrolls the appropriate window.

disabling "Allow terminal applications to handle clicks and drags" in profile settings -> mouse -> miscellaneous should restore the old gdb behaviour.

Alternatively pressing and holding Shift should allow you to select text as usual in gdb.
Comment 3 Paul Fee 2022-02-21 15:23:13 UTC
Created attachment 147004 [details]
Screenshot of Konsole mouse settings

I don't see the option "Allow terminal applications to handle clicks and drags" with Konsole 21.12.2.

However, the suggestion to use "shift" while selecting/pasting is even better as it gives the best of both worlds.
Comment 4 Paul Fee 2022-02-21 15:25:07 UTC
Resolved as a case of user error.  I wasn't aware that GDB has mouse functionality that affects select/paste operations.  However the workaround of pressing SHIFT works well, so no need to change konsole.
Comment 5 Ahmad Samir 2022-02-22 15:00:51 UTC
You're right, that option is a new addition, so it's not in the 12.12.2 branch.