Bug 415644 - Previously selected text can be deleted by editing another line of the file
Summary: Previously selected text can be deleted by editing another line of the file
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: All editors (show other bugs)
Version: 5.4.3
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-28 14:38 UTC by meyraud705
Modified: 2020-02-14 10:32 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Deselect text when moving cursor (622 bytes, patch)
2020-02-01 13:24 UTC, meyraud705
Details

Note You need to log in before you can comment on or make changes to this bug.
Description meyraud705 2019-12-28 14:38:26 UTC
When moving to another line by clicking on a warning in the build tool view, any previously selected text is not deselected.

STEPS TO REPRODUCE
1. Open a source file that contains warning or error
2. Select some text in this file
3. Build
4. Click on a warning in build tool view: cursor move to the position of the warning
5. Press 'del' key or any key that produces a character: text selected at step 2 is deleted

Note that the selected text and the warning must be in the same file.

Linux/KDE Plasma: Kubuntu 19.10
KDE Plasma Version: KDE plasma 5.17.4
KDE Frameworks Version: 5.65
Qt Version: 5.12.14
Comment 1 meyraud705 2020-02-01 13:24:27 UTC
Created attachment 125587 [details]
Deselect text when moving cursor

I attached a patch that fixes this issue. I am not familiar with this project so I am not sure it is the correct way to fix this but it works.
Comment 2 Christoph Feck 2020-02-01 14:08:26 UTC
Thank you for looking at the issue! KDevelop developers use a gitlab instance to allow contributors to submit merge requests at https://invent.kde.org/kde/kdevelop
Comment 3 Milian Wolff 2020-02-14 10:23:56 UTC
funny how noone noticed this until now

I'll apply a patch based on yours now, thanks!
Comment 4 Milian Wolff 2020-02-14 10:32:18 UTC
Git commit f8754f08ac096100b5160940a0003ad4d52c2a57 by Milian Wolff.
Committed on 14/02/2020 at 10:31.
Pushed by mwolff into branch '5.5'.

Clear selection when updating cursor position

Normally the user cannot get distinct selections and cursor
positions either using the mouse or keyboard. So we shouldn't
get into that position either when programatically changing
the cursor position.

M  +2    -4    kdevplatform/shell/textdocument.cpp

https://invent.kde.org/kde/kdevelop/commit/f8754f08ac096100b5160940a0003ad4d52c2a57