Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gnome-builder gnome-builder
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 308
    • Issues 308
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 5
    • Merge requests 5
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • gnome-buildergnome-builder
  • Merge requests
  • !535

vim+sourceview: Fix extending selection left

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Peter Maatman requested to merge blackwolf12333/gnome-builder:fix_vim_visual_select_previous_character_movement into main Feb 21, 2022
  • Overview 2
  • Commits 1
  • Pipelines 3
  • Changes 1

When using vim keybindings to enter visual "selection" mode and moving the cursor back immediately after entering visual mode the selection would become empty because both marks are at the same position. The expected behavior is for the selection to extend to the previous character.

Example:

This is som|e| text

When the cursor is on e and we enter visual mode, the insert and selection marks are where the | symbols are, insert is the left-hand | and selection the right-hand |.

When we then use h to move the cursor left we would end up in the following situation:

This is som||e text

So now the insert and selection mark are in the same position, this makes the selection empty.

We also expected to move to the situation below:

This is so|me| text

Such that the selection is extended to the left to include m.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fix_vim_visual_select_previous_character_movement