@@ -257,6 +257,7 @@ impl Command {
257 goto_window_middle, "Goto window middle",
257 goto_window_middle, "Goto window middle",
258 goto_window_bottom, "Goto window bottom",
258 goto_window_bottom, "Goto window bottom",
259 goto_last_accessed_file, "Goto last accessed file",
259 goto_last_accessed_file, "Goto last accessed file",
260+ goto_last_modification, "Goto last modification",
260 goto_line, "Goto line",
261 goto_line, "Goto line",
261 goto_last_line, "Goto last line",
262 goto_last_line, "Goto last line",
262 goto_first_diag, "Goto first diagnostic",
263 goto_first_diag, "Goto first diagnostic",
@@ -3195,6 +3196,19 @@ fn goto_last_accessed_file(cx: &mut Context) {
3199+fn goto_last_modification(cx: &mut Context) {
3200+ let (view, doc) = current!(cx.editor);
3201+ let pos = doc.history.get_mut().last_edit_pos();
3202+ let text = doc.text().slice(..);
3203+ if let Some(pos) = pos {
3204+ let selection = doc
3205+ .selection(view.id)
3207+ .transform(|range| range.put_cursor(text, pos, doc.mode == Mode::Select));
3208+ doc.set_selection(view.id, selection);
3198fn select_mode(cx: &mut Context) {
3212fn select_mode(cx: &mut Context) {
3199 let (view, doc) = current!(cx.editor);
3213 let (view, doc) = current!(cx.editor);
3200 let text = doc.text().slice(..);
3214 let text = doc.text().slice(..);