Fix mouse coords for programs interested with it
ClosedPublic

Authored by mbeniamino on May 24 2018, 9:56 AM.

Details

Summary

In normal usage Konsole offsets the position of the mouse
by half a char so that the user can extend the selection to
the last column. When using programs interested with
mouse (vim, mc, aptitude, etc...) Konsole shouldn't apply
the offset since mouse events should always apply to the
character cell under the pointer. This patch sets the 'edge'
flag of getCharacterPosition to !_usesMouseTracking.

Diff Detail

Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
mbeniamino created this revision.May 24 2018, 9:56 AM
Restricted Application added a subscriber: konsole-devel. · View Herald TranscriptMay 24 2018, 9:56 AM
mbeniamino requested review of this revision.May 24 2018, 9:56 AM

I think we need to fix _mouseMarks at some point

FIXME: the actual value of _mouseMarks is the opposite of its semantic.
When using programs not interested with mouse(shell, less), it is true.
// When using programs interested with mouse(vim,mc), it is false.

I think we need to fix _mouseMarks at some point

FIXME: the actual value of _mouseMarks is the opposite of its semantic.
When using programs not interested with mouse(shell, less), it is true.
// When using programs interested with mouse(vim,mc), it is false.

Should be done in https://phabricator.kde.org/D13134

Can you try to use arcanist for patches? Once you have it setup, it should help. Currently your patches don't have the author set. I can work around it until you get is working.

https://community.kde.org/Infrastructure/Phabricator#Using_Arcanist_to_post_patches

Do you have time to rebase and change these to !_usesMouseTracking? If not, I can do it.

mbeniamino updated this revision to Diff 35054.May 28 2018, 7:21 PM
mbeniamino edited the summary of this revision. (Show Details)

Changed _mouseMarks to !_usesMouseTracking

I'm afraid I've opened a new revision. Can you close D13179 ?

Also is this one ok?

Sorry for the noise, these tools are new for me.

mbeniamino updated this revision to Diff 35076.May 29 2018, 6:28 AM

Squashed the commits to a single one rebased on the changes from D13134 .

Ok, I've updated this revision with what I think is the correct patch to be applied on the current code and I've closed the revision I've opened by mistake yesterday. If there is something left to fix please proceed, I'm not touching anything. In case you need to check out the full code base, this patch is also published here: https://github.com/mbeniamino/konsole (commit 14f0bcc3788fe4ad7809caad971bbbec9d9ba320).

hindenburg edited the summary of this revision. (Show Details)May 29 2018, 12:30 PM
This revision is now accepted and ready to land.May 30 2018, 12:43 AM
This revision was automatically updated to reflect the committed changes.