parent
ee25e3c5f4
commit
34e38dd04a
|
@ -341,9 +341,10 @@ local commands = {
|
||||||
end,
|
end,
|
||||||
|
|
||||||
["doc:save-as"] = function()
|
["doc:save-as"] = function()
|
||||||
|
local last_doc = core.last_active_view and core.last_active_view.doc
|
||||||
if doc().filename then
|
if doc().filename then
|
||||||
core.command_view:set_text(doc().filename)
|
core.command_view:set_text(doc().filename)
|
||||||
elseif core.last_active_view and core.last_active_view.doc then
|
elseif last_doc and last_doc.filename then
|
||||||
local dirname, filename = core.last_active_view.doc.abs_filename:match("(.*)[/\\](.+)$")
|
local dirname, filename = core.last_active_view.doc.abs_filename:match("(.*)[/\\](.+)$")
|
||||||
core.command_view:set_text(core.normalize_to_project_dir(dirname) .. PATHSEP)
|
core.command_view:set_text(core.normalize_to_project_dir(dirname) .. PATHSEP)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue