@@ -5353,7 +5353,10 @@ fn select_textobject_inner(cx: &mut Context) {
53535353
53545354fn select_textobject(cx: &mut Context, objtype: textobject::TextObject) {
53555355 let count = cx.count();
5356+
53565357 cx.on_next_key(move |cx, event| {
5358+ cx.editor.autoinfo = None;
5359+ cx.editor.pseudo_pending = None;
53575360 if let Some(ch) = event.char() {
53585361 let textobject = move |editor: &mut Editor| {
53595362 let (view, doc) = current!(editor);
@@ -5402,7 +5405,32 @@ fn select_textobject(cx: &mut Context, objtype: textobject::TextObject) {
54025405 textobject(cx.editor);
54035406 cx.editor.last_motion = Some(Motion(Box::new(textobject)));
54045407 }
5405− })
5408+ });
5409+
5410+ if let Some((title, abbrev)) = match objtype {
5411+ textobject::TextObject::Inside => Some(("Match inside", "mi")),
5412+ textobject::TextObject::Around => Some(("Match around", "ma")),
5413+ _ => return,
5414+ } {
5415+ let help_text = [
5416+ ("w", "Word"),
5417+ ("W", "WORD"),
5418+ ("c", "Class (tree-sitter)"),
5419+ ("f", "Function (tree-sitter)"),
5420+ ("p", "Parameter (tree-sitter)"),
5421+ ("m", "Matching delimiter under cursor"),
5422+ (" ", "... or any character acting as a pair"),
5423+ ];
5424+
5425+ cx.editor.autoinfo = Some(Info::new(
5426+ title,
5427+ help_text
5428+ .into_iter()
5429+ .map(|(col1, col2)| (col1.to_string(), col2.to_string()))
5430+ .collect(),
5431+ ));
5432+ cx.editor.pseudo_pending = Some(abbrev.to_string());
5433+ };
54065434}
54075435
54085436fn surround_add(cx: &mut Context) {