Unified open and saving style. (#189)
This commit is contained in:
@@ -299,6 +299,9 @@ local commands = {
|
||||
["doc:save-as"] = function()
|
||||
if doc().filename then
|
||||
core.command_view:set_text(doc().filename)
|
||||
elseif core.last_active_view then
|
||||
local dirname, filename = core.last_active_view.doc.abs_filename:match("(.*)[/\\](.+)$")
|
||||
core.command_view:set_text(core.normalize_to_project_dir(dirname) .. PATHSEP)
|
||||
end
|
||||
core.command_view:enter("Save As", function(filename)
|
||||
save(common.home_expand(filename))
|
||||
|
||||
Reference in New Issue
Block a user