File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -355,6 +355,8 @@ fn write_impl(
355
355
None
356
356
} ;
357
357
358
+ doc. append_changes_to_history ( view) ;
359
+
358
360
if fmt. is_none ( ) {
359
361
let id = doc. id ( ) ;
360
362
cx. editor . save ( id, path, force) ?;
@@ -732,6 +734,9 @@ pub fn write_all_impl(
732
734
None
733
735
} ;
734
736
737
+ let view = view_mut ! ( cx. editor) ;
738
+ doc. append_changes_to_history ( view) ;
739
+
735
740
if fmt. is_none ( ) {
736
741
cx. editor . save :: < PathBuf > ( doc_id, None , force) ?;
737
742
}
Original file line number Diff line number Diff line change @@ -1311,15 +1311,9 @@ impl Component for EditorView {
1311
1311
cx. editor . count = None ;
1312
1312
1313
1313
let config = cx. editor . config ( ) ;
1314
- let mode = cx. editor . mode ( ) ;
1315
1314
let ( view, doc) = current ! ( cx. editor) ;
1316
1315
view. ensure_cursor_in_view ( doc, config. scrolloff ) ;
1317
-
1318
- // Store a history state if not in insert mode. Otherwise wait till we exit insert
1319
- // to include any edits to the paste in the history state.
1320
- if mode != Mode :: Insert {
1321
- doc. append_changes_to_history ( view) ;
1322
- }
1316
+ doc. append_changes_to_history ( view) ;
1323
1317
1324
1318
EventResult :: Consumed ( None )
1325
1319
}
You can’t perform that action at this time.
0 commit comments