Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mim and mam do not work on the rightmost delimiter #12454

Open
robinmoussu opened this issue Jan 8, 2025 · 0 comments
Open

mim and mam do not work on the rightmost delimiter #12454

robinmoussu opened this issue Jan 8, 2025 · 0 comments
Labels
C-bug Category: This is a bug

Comments

@robinmoussu
Copy link

Summary

When the cursor is on the rightmost delimiter (tested on ) and }), mim and mam do not work if you are at the top level or the block one level bigger than the current delimiter is selected.

In all cases, I expect mim to do the same than mmmim, likewise for mam and mmmam.

Note: It feels very similar with #11813

Reproduction Steps

Assuming you have this text in your buffer:

foo() {
    bar("xxx");
}

mim does, if the cursor is initially on:

  • } or the closing parenthesis of foo() => nothing is selected
  • the closing parenthesis of bar("xxx") => all the text inside {} is selected
  • the closing double quote => xxx" is selected, the cursor is incorrectly on the rightmost "

mam does, if the cursor is initially on:

  • } or the closing parenthesis of foo() => nothing is selected
  • the closing parenthesis of bar("xxx") => all the text inside {} is selected (and the cursor is on } + the newline and } (and the cursor is on the } (note that the opening { is not selected)
  • the closing double quote => "xxx") is selected, the cursor is incorrectly on the rightmost )

Helix log

No response

Platform

linux

Terminal Emulator

zelij inside wezterm

Installation Method

source

Helix Version

24.07-326-gce133a28

@robinmoussu robinmoussu added the C-bug Category: This is a bug label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

1 participant