Changed printed filenames to use format-specifier "%s" instead of %q

Fixes #22
This commit is contained in:
rxi 2020-04-25 13:26:55 +01:00
parent c658b6f1ca
commit accf09c4f9
3 changed files with 5 additions and 5 deletions

View File

@ -56,7 +56,7 @@ end
local function save(filename)
doc():save(filename)
core.log("Saved %q", doc().filename)
core.log("Saved \"%s\"", doc().filename)
end

View File

@ -133,7 +133,7 @@ function core.quit(force)
if dirty_count > 0 then
local text
if dirty_count == 1 then
text = string.format("%q has unsaved changes. Quit anyway?", dirty_name)
text = string.format("\"%s\" has unsaved changes. Quit anyway?", dirty_name)
else
text = string.format("%d docs have unsaved changes. Quit anyway?", dirty_count)
end
@ -210,7 +210,7 @@ function core.open_doc(filename)
-- no existing doc for filename; create new
local doc = Doc(filename)
table.insert(core.docs, doc)
core.log_quiet(filename and "Opened doc %q" or "Opened new doc", filename)
core.log_quiet(filename and "Opened doc \"%s\"" or "Opened new doc", filename)
return doc
end
@ -339,7 +339,7 @@ function core.step()
local doc = core.docs[i]
if #core.get_views_referencing_doc(doc) == 0 then
table.remove(core.docs, i)
core.log_quiet("Closed doc %q", doc:get_name())
core.log_quiet("Closed doc \"%s\"", doc:get_name())
end
end

View File

@ -23,7 +23,7 @@ local function reload_doc(doc)
update_time(doc)
doc:clean()
core.log_quiet("Auto-reloaded doc %q", doc.filename)
core.log_quiet("Auto-reloaded doc \"%s\"", doc.filename)
end