@@ -1086,18 +1086,27 @@ fn extend_next_long_word_end(cx: &mut Context) {
1086
1086
extend_word_impl ( cx, movement:: move_next_long_word_end)
1087
1087
}
1088
1088
1089
- fn will_find_char < F > ( cx : & mut Context , search_fn : F , inclusive : bool , extend : bool )
1090
- where
1089
+ fn will_find_char < F > (
1090
+ cx : & mut Context ,
1091
+ search_fn : F ,
1092
+ inclusive : bool ,
1093
+ extend : bool ,
1094
+ pseudo_pending : & str ,
1095
+ ) where
1091
1096
F : Fn ( RopeSlice , char , usize , usize , bool ) -> Option < usize > + ' static ,
1092
1097
{
1093
1098
// TODO: count is reset to 1 before next key so we move it into the closure here.
1094
1099
// Would be nice to carry over.
1095
1100
let count = cx. count ( ) ;
1096
1101
1102
+ cx. editor . pseudo_pending = Some ( pseudo_pending. to_string ( ) ) ;
1103
+
1097
1104
// need to wait for next key
1098
1105
// TODO: should this be done by grapheme rather than char? For example,
1099
1106
// we can't properly handle the line-ending CRLF case here in terms of char.
1100
1107
cx. on_next_key ( move |cx, event| {
1108
+ cx. editor . pseudo_pending = None ;
1109
+
1101
1110
let ch = match event {
1102
1111
KeyEvent {
1103
1112
code : KeyCode :: Enter ,
@@ -1200,35 +1209,35 @@ fn find_prev_char_impl(
1200
1209
}
1201
1210
1202
1211
fn find_till_char ( cx : & mut Context ) {
1203
- will_find_char ( cx, find_next_char_impl, false , false )
1212
+ will_find_char ( cx, find_next_char_impl, false , false , "t" )
1204
1213
}
1205
1214
1206
1215
fn find_next_char ( cx : & mut Context ) {
1207
- will_find_char ( cx, find_next_char_impl, true , false )
1216
+ will_find_char ( cx, find_next_char_impl, true , false , "f" )
1208
1217
}
1209
1218
1210
1219
fn extend_till_char ( cx : & mut Context ) {
1211
- will_find_char ( cx, find_next_char_impl, false , true )
1220
+ will_find_char ( cx, find_next_char_impl, false , true , "t" )
1212
1221
}
1213
1222
1214
1223
fn extend_next_char ( cx : & mut Context ) {
1215
- will_find_char ( cx, find_next_char_impl, true , true )
1224
+ will_find_char ( cx, find_next_char_impl, true , true , "f" )
1216
1225
}
1217
1226
1218
1227
fn till_prev_char ( cx : & mut Context ) {
1219
- will_find_char ( cx, find_prev_char_impl, false , false )
1228
+ will_find_char ( cx, find_prev_char_impl, false , false , "T" )
1220
1229
}
1221
1230
1222
1231
fn find_prev_char ( cx : & mut Context ) {
1223
- will_find_char ( cx, find_prev_char_impl, true , false )
1232
+ will_find_char ( cx, find_prev_char_impl, true , false , "F" )
1224
1233
}
1225
1234
1226
1235
fn extend_till_prev_char ( cx : & mut Context ) {
1227
- will_find_char ( cx, find_prev_char_impl, false , true )
1236
+ will_find_char ( cx, find_prev_char_impl, false , true , "T" )
1228
1237
}
1229
1238
1230
1239
fn extend_prev_char ( cx : & mut Context ) {
1231
- will_find_char ( cx, find_prev_char_impl, true , true )
1240
+ will_find_char ( cx, find_prev_char_impl, true , true , "F" )
1232
1241
}
1233
1242
1234
1243
fn repeat_last_motion ( cx : & mut Context ) {
0 commit comments