File tree 1 file changed +16
-0
lines changed
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -428,11 +428,27 @@ function OrgMappings:_todo_change_state(direction)
428
428
section_config = nil
429
429
end
430
430
431
+ -- @type nil | false | 'time' | 'note'
432
+ local user_config
433
+ if config .org_todo_keywords ~= nil then
434
+ local todoConfig = TodoConfig :parse (table.concat (config .org_todo_keywords , ' ' ))
435
+ if todoConfig ~= nil then
436
+ user_config = todoConfig :get_logging_behavior (old_state , new_state )
437
+ else
438
+ -- TODO: Report invalid config?
439
+ user_config = nil
440
+ end
441
+ else
442
+ user_config = nil
443
+ end
444
+
431
445
-- Use the most locally available log config
432
446
--- @type false | ' time' | ' note'
433
447
local log_config
434
448
if section_config ~= nil then
435
449
log_config = section_config
450
+ elseif user_config ~= nil then
451
+ log_config = user_config
436
452
else
437
453
log_config = global_config
438
454
end
You can’t perform that action at this time.
0 commit comments