Fixed minor error that occurs when saving as after viewing a non-doc tab.
This commit is contained in:
parent
f17f5a4d6d
commit
8acb3fae8c
|
@ -343,7 +343,7 @@ local commands = {
|
||||||
["doc:save-as"] = function()
|
["doc:save-as"] = function()
|
||||||
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 then
|
elseif core.last_active_view and core.last_active_view.doc 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