aboutsummaryrefslogtreecommitdiff
path: root/plugins/lfautoinsert.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/lfautoinsert.lua')
-rw-r--r--plugins/lfautoinsert.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/lfautoinsert.lua b/plugins/lfautoinsert.lua
index ae3da75..add57f4 100644
--- a/plugins/lfautoinsert.lua
+++ b/plugins/lfautoinsert.lua
@@ -65,10 +65,10 @@ local function indent_size(doc, line)
end
command.add("core.docview!", {
- ["autoinsert:newline"] = function()
+ ["autoinsert:newline"] = function(dv)
command.perform("doc:newline")
- local doc = core.active_view.doc
+ local doc = dv.doc
local line, col = doc:get_selection()
local text = doc.lines[line - 1]