aboutsummaryrefslogtreecommitdiff
path: root/plugins/datetimestamps.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/datetimestamps.lua')
-rw-r--r--plugins/datetimestamps.lua16
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/datetimestamps.lua b/plugins/datetimestamps.lua
index f16af83..4867c08 100644
--- a/plugins/datetimestamps.lua
+++ b/plugins/datetimestamps.lua
@@ -57,29 +57,29 @@ config.plugins.datetimestamps = common.merge({
}
}, config.plugins.datetimestamps)
-local function datestamp()
+local function datestamp(dv)
local sOut = os.date(config.plugins.datetimestamps.format_datestamp)
- core.active_view.doc:text_input(sOut)
+ dv.doc:text_input(sOut)
end
-local function datetimestamp()
+local function datetimestamp(dv)
local sOut = os.date(config.plugins.datetimestamps.format_datetimestamp)
- core.active_view.doc:text_input(sOut)
+ dv.doc:text_input(sOut)
end
-local function timestamp()
+local function timestamp(dv)
local sOut = os.date(config.plugins.datetimestamps.format_timestamp)
- core.active_view.doc:text_input(sOut)
+ dv.doc:text_input(sOut)
end
command.add("core.docview", {
["datetimestamps:insert-datestamp"] = datestamp,
["datetimestamps:insert-timestamp"] = timestamp,
["datetimestamps:insert-datetimestamp"] = datetimestamp,
- ["datetimestamps:insert-custom"] = function()
+ ["datetimestamps:insert-custom"] = function(dv)
core.command_view:enter("Date format eg: %H:%M:%S", {
submit = function(cmd)
- core.active_view.doc:text_input(os.date(cmd) or "")
+ dv.doc:text_input(os.date(cmd) or "")
end
})
end,