Skip to content
New issue

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

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

Already on GitHub? # to your account

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

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

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

robinmoussu opened this issue Jan 8, 2025 · 3 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

@nik-rev
Copy link
Contributor

nik-rev commented Jan 11, 2025

Can you try this: #12494

@robinmoussu
Copy link
Author

It still does not work if your cursor is on the right delimiter.

@nik-rev
Copy link
Contributor

nik-rev commented Jan 11, 2025

It still does not work if your cursor is on the right delimiter.

Ok, thanks for testing!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

2 participants