mirror of
https://github.com/Ascyii/telekasten.nvim.git
synced 2026-01-01 06:14:23 -05:00
Fixes bug with new callback flow
With the new callback parameter it becomes necessary to fill the nil arguments of a function if it is to receive the callback as the last argument to reproduce bug try creating a new weekly note.
This commit is contained in:
@@ -464,7 +464,7 @@ local function create_note_from_template(
|
|||||||
|
|
||||||
-- now write the output file, substituting vars line by line
|
-- now write the output file, substituting vars line by line
|
||||||
local file_dir = filepath:match("(.*/)") or ""
|
local file_dir = filepath:match("(.*/)") or ""
|
||||||
check_dir_and_ask(file_dir, file_dir, function(dir_succeed)
|
check_dir_and_ask(file_dir, "Create weekly dir", function(dir_succeed)
|
||||||
if dir_succeed == false then
|
if dir_succeed == false then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@@ -1173,6 +1173,7 @@ local function FindDailyNotes(opts)
|
|||||||
nil,
|
nil,
|
||||||
fname,
|
fname,
|
||||||
M.note_type_templates.daily,
|
M.note_type_templates.daily,
|
||||||
|
nil,
|
||||||
function()
|
function()
|
||||||
opts.erase = true
|
opts.erase = true
|
||||||
opts.erase_file = fname
|
opts.erase_file = fname
|
||||||
@@ -1240,6 +1241,7 @@ local function FindWeeklyNotes(opts)
|
|||||||
nil,
|
nil,
|
||||||
fname,
|
fname,
|
||||||
M.note_type_templates.weekly,
|
M.note_type_templates.weekly,
|
||||||
|
nil,
|
||||||
function()
|
function()
|
||||||
opts.erase = true
|
opts.erase = true
|
||||||
opts.erase_file = fname
|
opts.erase_file = fname
|
||||||
@@ -2570,6 +2572,7 @@ local function GotoThisWeek(opts)
|
|||||||
nil,
|
nil,
|
||||||
fname,
|
fname,
|
||||||
M.note_type_templates.weekly,
|
M.note_type_templates.weekly,
|
||||||
|
nil,
|
||||||
function()
|
function()
|
||||||
opts.erase = true
|
opts.erase = true
|
||||||
opts.erase_file = fname
|
opts.erase_file = fname
|
||||||
|
|||||||
Reference in New Issue
Block a user