@@ -3238,8 +3238,8 @@ pub mod insert {
3238
3238
let text = doc. text ( ) . slice ( ..) ;
3239
3239
3240
3240
let selection = doc. selection ( view. id ) . clone ( ) . transform ( |range| {
3241
- let cursor = Range :: point ( range. cursor ( text ) ) ;
3242
- let next = movement :: move_prev_word_start ( text , cursor, count ) ;
3241
+ let anchor = movement :: move_prev_word_start ( text , range, count ) . from ( ) ;
3242
+ let next = Range :: new ( anchor , range . cursor ( text ) ) ;
3243
3243
exclude_cursor ( text, next, range)
3244
3244
} ) ;
3245
3245
delete_selection_insert_mode ( doc, view, & selection) ;
@@ -3252,10 +3252,11 @@ pub mod insert {
3252
3252
let ( view, doc) = current ! ( cx. editor) ;
3253
3253
let text = doc. text ( ) . slice ( ..) ;
3254
3254
3255
- let selection = doc
3256
- . selection ( view. id )
3257
- . clone ( )
3258
- . transform ( |range| movement:: move_next_word_start ( text, range, count) ) ;
3255
+ let selection = doc. selection ( view. id ) . clone ( ) . transform ( |range| {
3256
+ let head = movement:: move_next_word_end ( text, range, count) . to ( ) ;
3257
+ Range :: new ( range. cursor ( text) , head)
3258
+ } ) ;
3259
+
3259
3260
delete_selection_insert_mode ( doc, view, & selection) ;
3260
3261
3261
3262
lsp:: signature_help_impl ( cx, SignatureHelpInvoked :: Automatic ) ;
0 commit comments