Skip to content

split_selection is producing a single letter selection if split sequence is at beggining of selection #14418

@Isokaeder

Description

@Isokaeder

Summary

split_selection works not as I would expect if the split sequence is found at the beginning of the selection.

Reproduction Steps

I tried this:

  1. hx
  2. create file content abcccccccabccccccab
  3. select entire word [abcccccccabccccccab] (areas denoted by [] are selected)
  4. Split by subsequence "ab" (Sab<enter>)

I expected this to happen:
Only the "c"-sequences should be selected, like this: ab[ccccccc]ab[cccccc]ab

Instead, this happened:
Selection includes one single character at the very start [a]b[ccccccc]ab[cccccc]ab. However, note that the splitting worked as I would expect at the tail of the selection.

Helix log

n/a

Platform

macOS

Terminal Emulator

alacritty

Installation Method

brew

Helix Version

helix 25.07.1 (a05c151)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions