Bug 372503 - SUGGESTION: KATE Single click on line number selects line
Summary: SUGGESTION: KATE Single click on line number selects line
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Microsoft Windows
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
Depends on:
Reported: 2016-11-15 13:01 UTC by yereverluvinunclebert
Modified: 2018-04-26 15:06 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.46


Note You need to log in before you can comment on or make changes to this bug.
Description yereverluvinunclebert 2016-11-15 13:01:19 UTC
Using other editors (context, bbedit) I miss a bit of functionality ie. the ability to highlight a single line of code by a single click on the line number. Kate currently knows which line you are on as when the cursor is on a line and when a copy/paste is performed, the line is duplicated. However, other functions such as clicking on delete does not clear the line. The functionality is half-implemented and I suggest completing it.

So, if you click on the line number the line is selected. Currently a triple-click is required to select a line which is rather an overkill.

This would be very useful indeed. Try the above named editors and see the single click line select in operation.

PS I have recently started using Kate as my default editor on Windows since the recent port.
Comment 1 yereverluvinunclebert 2017-11-18 14:27:17 UTC
This would be a very tiny change and a very useful one. Will no-one recognise this?
Comment 2 Nate Graham 2017-12-06 22:18:26 UTC
Agreed, this would be nice. yereverluvinunclebert, A lot of people recognize it, but nobody has submitted a patch yet. :) Kate is volunteer-developed; the best way to get something that you want done is to do it yourself! Otherwise patience is warranted; Kate developers are doing this on their own time, free of charge, for the goodness of humanity.
Comment 3 yereverluvinunclebert 2018-01-24 10:36:51 UTC
I consider this to be more than a nice-to-have. I think it is essential to have functions that enhance the productivity of the user. It is a subtle change but a single click on the line to highlight and select is one such function that changes how you operate with your code. Makes it so much easier to select a line for copying.

Kate already has the functionality but it takes three clicks, each extra click is a reason for not selecting a line in this fashion, one click would be great, two clicks are annoying but acceptable, three clicks - "What's going on here?".

This requested functionality is in line with being able to select a block of text by highlighting and selecting the text with the mouse whilst dragging over the line numbers. At the moment a single click does something, it highlights but does not select.

The change would be minor and easy to accomplish I am sure.
Comment 4 Randy Kron 2018-03-25 14:21:28 UTC
This is something that really annoyed me when I first started using Kate, though I've gotten used to it. I've submitted a revision on Phabricator https://phabricator.kde.org/D11685 to implement this. I also added a new config setting to enable this, as I know not everyone will want to use it. It is turned off by default. I've been using it for a while now and it has taken me a while to get used to it. I also have a revision ready for Kate to add this to the docbook if this revision lands.
Comment 5 yereverluvinunclebert 2018-04-18 22:06:41 UTC
Pleased to see others want this too!
Comment 6 Nate Graham 2018-04-26 15:04:43 UTC
Git commit a426f5a60ff327a1772dcf5d3a81ad8928473b8b by Nathaniel Graham, on behalf of Randy Kron.
Committed on 26/04/2018 at 15:04.
Pushed by ngraham into branch 'master'.

Implement single click on line number to select line of text

Implements selecting entire line of text with a single click on line number.

Test Plan:
Click on a line number and check that it selects the line the same way that triple-clicking did before.
Check that selecting a line and then Shift+Click on another line selects all intervening lines.

Reviewers: #frameworks, #kate, #ktexteditor, ngraham, cullmann

Reviewed By: #kate, #ktexteditor, cullmann

Subscribers: dhaumann, rkron, mwolff, ngraham, #ktexteditor, #kate, #frameworks

Tags: #kate, #frameworks

Differential Revision: https://phabricator.kde.org/D11685

M  +9    -2    src/view/kateviewhelpers.cpp
M  +6    -0    src/view/kateviewinternal.cpp
M  +1    -0    src/view/kateviewinternal.h