@@ -1091,27 +1091,18 @@ fn extend_next_long_word_end(cx: &mut Context) {
1091 extend_word_impl(cx, movement::move_next_long_word_end)
1091 extend_word_impl(cx, movement::move_next_long_word_end)
1094−fn will_find_char<F>(
1094+fn will_find_char<F>(cx: &mut Context, search_fn: F, inclusive: bool, extend: bool)
1099− pseudo_pending: &str,
1101 F: Fn(RopeSlice, char, usize, usize, bool) -> Option<usize> + 'static,
1096 F: Fn(RopeSlice, char, usize, usize, bool) -> Option<usize> + 'static,
1103 // TODO: count is reset to 1 before next key so we move it into the closure here.
1098 // TODO: count is reset to 1 before next key so we move it into the closure here.
1104 // Would be nice to carry over.
1099 // Would be nice to carry over.
1105 let count = cx.count();
1100 let count = cx.count();
1107− cx.editor.pseudo_pending = Some(pseudo_pending.to_string());
1109 // need to wait for next key
1102 // need to wait for next key
1110 // TODO: should this be done by grapheme rather than char? For example,
1103 // TODO: should this be done by grapheme rather than char? For example,
1111 // we can't properly handle the line-ending CRLF case here in terms of char.
1104 // we can't properly handle the line-ending CRLF case here in terms of char.
1112 cx.on_next_key(move |cx, event| {
1105 cx.on_next_key(move |cx, event| {
1113− cx.editor.pseudo_pending = None;
1115 let ch = match event {
1106 let ch = match event {
1116 KeyEvent {
1107 KeyEvent {
1117 code: KeyCode::Enter,
1108 code: KeyCode::Enter,
@@ -1214,35 +1205,35 @@ fn find_prev_char_impl(
1216fn find_till_char(cx: &mut Context) {
1207fn find_till_char(cx: &mut Context) {
1217− will_find_char(cx, find_next_char_impl, false, false, "t")
1208+ will_find_char(cx, find_next_char_impl, false, false)
1220fn find_next_char(cx: &mut Context) {
1211fn find_next_char(cx: &mut Context) {
1221− will_find_char(cx, find_next_char_impl, true, false, "f")
1212+ will_find_char(cx, find_next_char_impl, true, false)
1224fn extend_till_char(cx: &mut Context) {
1215fn extend_till_char(cx: &mut Context) {
1225− will_find_char(cx, find_next_char_impl, false, true, "t")
1216+ will_find_char(cx, find_next_char_impl, false, true)
1228fn extend_next_char(cx: &mut Context) {
1219fn extend_next_char(cx: &mut Context) {
1229− will_find_char(cx, find_next_char_impl, true, true, "f")
1220+ will_find_char(cx, find_next_char_impl, true, true)
1232fn till_prev_char(cx: &mut Context) {
1223fn till_prev_char(cx: &mut Context) {
1233− will_find_char(cx, find_prev_char_impl, false, false, "T")
1224+ will_find_char(cx, find_prev_char_impl, false, false)
1236fn find_prev_char(cx: &mut Context) {
1227fn find_prev_char(cx: &mut Context) {
1237− will_find_char(cx, find_prev_char_impl, true, false, "F")
1228+ will_find_char(cx, find_prev_char_impl, true, false)
1240fn extend_till_prev_char(cx: &mut Context) {
1231fn extend_till_prev_char(cx: &mut Context) {
1241− will_find_char(cx, find_prev_char_impl, false, true, "T")
1232+ will_find_char(cx, find_prev_char_impl, false, true)
1244fn extend_prev_char(cx: &mut Context) {
1235fn extend_prev_char(cx: &mut Context) {
1245− will_find_char(cx, find_prev_char_impl, true, true, "F")
1236+ will_find_char(cx, find_prev_char_impl, true, true)
1248fn repeat_last_motion(cx: &mut Context) {
1239fn repeat_last_motion(cx: &mut Context) {
@@ -4392,7 +4383,6 @@ fn select_textobject(cx: &mut Context, objtype: textobject::TextObject) {
4393 cx.on_next_key(move |cx, event| {
4384 cx.on_next_key(move |cx, event| {
4394 cx.editor.autoinfo = None;
4385 cx.editor.autoinfo = None;
4395− cx.editor.pseudo_pending = None;
4396 if let Some(ch) = event.char() {
4386 if let Some(ch) = event.char() {
4397 let textobject = move |editor: &mut Editor| {
4387 let textobject = move |editor: &mut Editor| {
4398 let (view, doc) = current!(editor);
4388 let (view, doc) = current!(editor);
@@ -4441,33 +4431,31 @@ fn select_textobject(cx: &mut Context, objtype: textobject::TextObject) {
4444− if let Some((title, abbrev)) = match objtype {
4434+ let title = match objtype {
4445− textobject::TextObject::Inside => Some(("Match inside", "mi")),
4435+ textobject::TextObject::Inside => "Match inside",
4446− textobject::TextObject::Around => Some(("Match around", "ma")),
4436+ textobject::TextObject::Around => "Match around",
4447 _ => return,
4437 _ => return,
4452− ("p", "Paragraph"),
4453− ("c", "Class (tree-sitter)"),
4454− ("f", "Function (tree-sitter)"),
4455− ("a", "Argument/parameter (tree-sitter)"),
4456− ("o", "Comment (tree-sitter)"),
4457− ("t", "Test (tree-sitter)"),
4458− ("m", "Closest surrounding pair to cursor"),
4459− (" ", "... or any character acting as a pair"),
4462− cx.editor.autoinfo = Some(Info::new(
4466− .map(|(col1, col2)| (col1.to_string(), col2.to_string()))
4469− cx.editor.pseudo_pending = Some(abbrev.to_string());
4442+ ("p", "Paragraph"),
4443+ ("c", "Class (tree-sitter)"),
4444+ ("f", "Function (tree-sitter)"),
4445+ ("a", "Argument/parameter (tree-sitter)"),
4446+ ("o", "Comment (tree-sitter)"),
4447+ ("t", "Test (tree-sitter)"),
4448+ ("m", "Closest surrounding pair to cursor"),
4449+ (" ", "... or any character acting as a pair"),
4452+ cx.editor.autoinfo = Some(Info::new(
4456+ .map(|(col1, col2)| (col1.to_string(), col2.to_string()))
4473fn surround_add(cx: &mut Context) {
4461fn surround_add(cx: &mut Context) {