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