nushell / nushell/reedline

Jump onto text object while outside of text object

Open
#1,195 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Rust
Stars
817
Forks
247
Avg merge
4d 14h
Merged PRs (30d)
30

Description

Reproduced on MacOS and ArchLinux, with Wezterm, iTerm2 and through ssh, on nushell 0.115.1

In vi and helix mode, you can jump to/select a text object (brackets, quotes...) when the cursor is outside the text object you specified. It seems to happen only when the cursor is on the left of the text object

Steps to reproduce

  • On vi mode, write test1 {test2} test3
  • put the cursor on test1
  • press ci{
    test2 is removed and the cursor is inside the bracket

If the cursor is on test3, nothing happens (the expected behavior)

Screenshots/Screencaptures

https://github.com/user-attachments/assets/5e65c331-3591-4d9b-bc7a-dfc7b6026e17

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the behavior in vi mode and helix mode with test1 {test2} test3, focusing on the ci{ text-object command when the cursor is to the left of the object. Trace the text-object selection and cursor-position handling; done means the command does not select or remove {test2} from outside the object, while valid selections still work.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.