diff --git a/src/FolderManager/FileView.vala b/src/FolderManager/FileView.vala index 684074922..9fa2800d5 100644 --- a/src/FolderManager/FileView.vala +++ b/src/FolderManager/FileView.vala @@ -322,6 +322,9 @@ public class Scratch.FolderManager.FileView : Code.Widgets.SourceList, Code.Pane selected.disconnect (once); var new_path = Path.get_dirname (path) + Path.DIR_SEPARATOR_S + new_name; this.toplevel_action_group.activate_action (MainWindow.ACTION_CLOSE_TAB, new Variant.string (path)); + // RecentManager requires valid URI + var new_uri = "file://" + new_path; // Code only edits local files + Gtk.RecentManager.get_default ().add_item (new_uri); this.select (new_path); }); } diff --git a/src/Services/Document.vala b/src/Services/Document.vala index 5ea4e1b87..2505959e1 100644 --- a/src/Services/Document.vala +++ b/src/Services/Document.vala @@ -635,7 +635,7 @@ namespace Scratch.Services { } - + Gtk.RecentManager.get_default ().add_item (get_uri ()); debug ("File ā€œ%sā€ saved successfully", get_basename ()); return true;