Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Konsole Konsole
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2
    • Issues 2
    • List
    • Boards
    • Service Desk
    • Milestones
  • Bugzilla
    • Bugzilla
  • Merge requests 27
    • Merge requests 27
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • UtilitiesUtilities
  • KonsoleKonsole
  • Merge requests
  • !754

Avoid using wrong coordinates on extendSelection

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Luis Javier Merino requested to merge ninjalj/konsole:work/ninjalj/fix-extend-selection-charcell-not-pixel into master Oct 08, 2022
  • Overview 3
  • Commits 1
  • Pipelines 3
  • Changes 1

It seems MR 659 exposed an old bug (sorry!). When extending the selection (shift + left mouse button) and there was no previous point of reference (either a selection, or a previous mouse press, with no intervening normal/alternate screen switches), extendSelection() was using the position measured in pixels instead of char cells to initialize the point of reference for further selection extend operations.

Before MR 659, this tended to result in the selection extending from the mouse position to the lower right corner on a subsequent selection extend operation.

Now, if there is no previous point of reference, use the cursor position. Whether to also use the cursor position as point of reference if there is no existing selection merits further consideration.

To reproduce the bug, open a new Konsole, and shift+LMB twice (once to set the out of bounds point of reference, and another one to actually create a selection) before doing any other mouse button presses.

BUG: 458822 BUG: 398320

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: work/ninjalj/fix-extend-selection-charcell-not-pixel