@@ -801,7 +801,6 @@ fn align_selections(cx: &mut Context) {
801801 });
802802
803803 doc.apply(&transaction, view.id);
804− doc.append_changes_to_history(view.id);
805804}
806805
807806fn align_fragment_to_width(fragment: &str, width: usize, align_style: usize) -> String {
@@ -1204,7 +1203,6 @@ fn replace(cx: &mut Context) {
12041203 });
12051204
12061205 doc.apply(&transaction, view.id);
1207− doc.append_changes_to_history(view.id);
12081206 }
12091207 })
12101208}
@@ -1222,7 +1220,6 @@ where
12221220 });
12231221
12241222 doc.apply(&transaction, view.id);
1225− doc.append_changes_to_history(view.id);
12261223}
12271224
12281225fn switch_case(cx: &mut Context) {
@@ -1862,7 +1859,6 @@ fn delete_selection_impl(cx: &mut Context, op: Operation) {
18621859
18631860 match op {
18641861 Operation::Delete => {
1865− doc.append_changes_to_history(view.id);
18661862 // exit select mode, if currently in select mode
18671863 exit_select_mode(cx);
18681864 }
@@ -3861,7 +3857,6 @@ fn normal_mode(cx: &mut Context) {
38613857 doc.mode = Mode::Normal;
38623858
38633859 try_restore_indent(doc, view.id);
3864− doc.append_changes_to_history(view.id);
38653860
38663861 // if leaving append mode, move cursor back by 1
38673862 if doc.restore_cursor {
@@ -4383,7 +4378,6 @@ fn signature_help(cx: &mut Context) {
43834378 );
43844379}
43854380
4386−// NOTE: Transactions in this module get appended to history when we switch back to normal mode.
43874381pub mod insert {
43884382 use super::*;
43894383 pub type Hook = fn(&Rope, &Selection, char) -> Option<Transaction>;
@@ -4998,7 +4992,6 @@ fn replace_with_yanked(cx: &mut Context) {
49984992 });
49994993
50004994 doc.apply(&transaction, view.id);
5001− doc.append_changes_to_history(view.id);
50024995 }
50034996 }
50044997}
@@ -5048,7 +5041,6 @@ fn paste_after(cx: &mut Context) {
50485041 .and_then(|values| paste_impl(values, doc, view, Paste::After, count))
50495042 {
50505043 doc.apply(&transaction, view.id);
5051− doc.append_changes_to_history(view.id);
50525044 }
50535045}
50545046
@@ -5063,7 +5055,6 @@ fn paste_before(cx: &mut Context) {
50635055 .and_then(|values| paste_impl(values, doc, view, Paste::Before, count))
50645056 {
50655057 doc.apply(&transaction, view.id);
5066− doc.append_changes_to_history(view.id);
50675058 }
50685059}
50695060
@@ -5099,7 +5090,6 @@ fn indent(cx: &mut Context) {
50995090 }),
51005091 );
51015092 doc.apply(&transaction, view.id);
5102− doc.append_changes_to_history(view.id);
51035093}
51045094
51055095fn unindent(cx: &mut Context) {
@@ -5139,7 +5129,6 @@ fn unindent(cx: &mut Context) {
51395129 let transaction = Transaction::change(doc.text(), changes.into_iter());
51405130
51415131 doc.apply(&transaction, view.id);
5142− doc.append_changes_to_history(view.id);
51435132}
51445133
51455134fn format_selections(cx: &mut Context) {
@@ -5186,8 +5175,6 @@ fn format_selections(cx: &mut Context) {
51865175
51875176 // doc.apply(&transaction, view.id);
51885177 }
5189−
5190− doc.append_changes_to_history(view.id);
51915178}
51925179
51935180fn join_selections(cx: &mut Context) {
@@ -5230,7 +5217,6 @@ fn join_selections(cx: &mut Context) {
52305217 // .with_selection(selection);
52315218
52325219 doc.apply(&transaction, view.id);
5233− doc.append_changes_to_history(view.id);
52345220}
52355221
52365222fn keep_or_remove_selections_impl(cx: &mut Context, remove: bool) {
@@ -5478,7 +5464,6 @@ fn toggle_comments(cx: &mut Context) {
54785464 let transaction = comment::toggle_line_comments(doc.text(), doc.selection(view.id), token);
54795465
54805466 doc.apply(&transaction, view.id);
5481− doc.append_changes_to_history(view.id);
54825467 exit_select_mode(cx);
54835468}
54845469
@@ -5535,7 +5520,6 @@ fn rotate_selection_contents(cx: &mut Context, direction: Direction) {
55355520 );
55365521
55375522 doc.apply(&transaction, view.id);
5538− doc.append_changes_to_history(view.id);
55395523}
55405524
55415525fn rotate_selection_contents_forward(cx: &mut Context) {
@@ -5875,7 +5859,6 @@ fn surround_add(cx: &mut Context) {
58755859
58765860 let transaction = Transaction::change(doc.text(), changes.into_iter());
58775861 doc.apply(&transaction, view.id);
5878− doc.append_changes_to_history(view.id);
58795862 }
58805863 })
58815864}
@@ -5908,7 +5891,6 @@ fn surround_replace(cx: &mut Context) {
59085891 }),
59095892 );
59105893 doc.apply(&transaction, view.id);
5911− doc.append_changes_to_history(view.id);
59125894 }
59135895 });
59145896 }
@@ -5931,7 +5913,6 @@ fn surround_delete(cx: &mut Context) {
59315913 let transaction =
59325914 Transaction::change(doc.text(), change_pos.into_iter().map(|p| (p, p + 1, None)));
59335915 doc.apply(&transaction, view.id);
5934− doc.append_changes_to_history(view.id);
59355916 }
59365917 })
59375918}
@@ -6102,7 +6083,6 @@ fn shell(cx: &mut Context, prompt: Cow<'static, str>, behavior: ShellBehavior) {
61026083 if behavior != ShellBehavior::Ignore {
61036084 let transaction = Transaction::change(doc.text(), changes.into_iter());
61046085 doc.apply(&transaction, view.id);
6105− doc.append_changes_to_history(view.id);
61066086 }
61076087
61086088 // after replace cursor may be out of bounds, do this to
@@ -6150,7 +6130,6 @@ fn add_newline_impl(cx: &mut Context, open: Open) {
61506130
61516131 let transaction = Transaction::change(text, changes);
61526132 doc.apply(&transaction, view.id);
6153− doc.append_changes_to_history(view.id);
61546133}
61556134
61566135fn rename_symbol(cx: &mut Context) {
@@ -6250,7 +6229,6 @@ fn increment_impl(cx: &mut Context, amount: i64) {
62506229 let transaction = transaction.with_selection(selection.clone());
62516230
62526231 doc.apply(&transaction, view.id);
6253− doc.append_changes_to_history(view.id);
62546232 }
62556233}
62566234