helix-editor / helix

A post-modern modal text editor.
https://helix-editor.com
Mozilla Public License 2.0
33.1k stars 2.46k forks source link

`mdm` not working on rightmost pair element #11813

Open rockboynton opened 10 hours ago

rockboynton commented 10 hours ago

Summary

I have a rust import statement, use foo::{bar, baz}; If I place the cursor on the rightmost }, and try to do mdm it doesn't work (error says "Surround pair not found around all cursors") But if I do mmmdm it works (delete the pair with the cursor on the leftmost {

Reproduction Steps

No response

Helix log

No response

Platform

Linux

Terminal Emulator

wezterm 20240203-110809-5046fc22

Installation Method

Nix Flake

Helix Version

helix 24.7, 748a9cf022eb74e96a3697e4b11b2490b1e58f08

rockboynton commented 10 hours ago

It is not just rust files, it can be any file

RoloEdits commented 1 hour ago

I've replicated this, but seems to be a bit more nuanced than I thought it would be. When deleting, it works if you select the first bracket open bracket, but trying to do this from the closing one leads to the weird behavior.

surround_delete