Skip to content

Line editor selects two characters instead of one #893

@LemmusLemmus

Description

@LemmusLemmus

Describe the bug

I normally use shift + arrow keys to select one character at a time in the line editor. However, now when I start to select text, two characters are always initially selected (one extra to the right of the caret), except when selecting the very last character (in which case it works as expected, since there is no extra character to the right of it).

This seems to be a regression. Everything works fine on version 0.100.0, but it is not working correctly on 0.103.0.

How to reproduce

  1. Write a couple of characters in the line editor, e.g. 123456789.
  2. Position the caret in-between, e.g. after the 3, 123|456789.
  3. Use e.g. shift + left arrow and observe that both the character 3 and the character 4 have been selected.

Expected behavior

I expect a single press of shift + left/right arrow to only select at most one character.

Configuration

key value
version 0.103.0
major 0
minor 103
patch 0
branch
commit_hash
build_os linux-x86_64
build_target x86_64-unknown-linux-gnu
rust_version rustc 1.85.0 (4d91de4e4 2025-02-17) (built from a source tarball)
cargo_version cargo 1.85.0 (d73d2caf9 2024-12-31)
build_time 1980-01-01 00:00:00 +00:00
build_rust_channel release
allocator standard
features default, sqlite, trash
installed_plugins

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions