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 @@ -419,11 +419,27 @@ function OrgMappings:_todo_change_state(direction)
419
419
section_config = nil
420
420
end
421
421
422
+ -- @type nil | false | 'time' | 'note'
423
+ local user_config
424
+ if config .org_todo_keywords ~= nil then
425
+ local todoConfig = TodoConfig :parse (table.concat (config .org_todo_keywords , ' ' ))
426
+ if todoConfig ~= nil then
427
+ user_config = todoConfig :get_logging_behavior (old_state , new_state )
428
+ else
429
+ -- TODO: Report invalid config?
430
+ user_config = nil
431
+ end
432
+ else
433
+ user_config = nil
434
+ end
435
+
422
436
-- Use the most locally available log config
423
437
--- @type false | ' time' | ' note'
424
438
local log_config
425
439
if section_config ~= nil then
426
440
log_config = section_config
441
+ elseif user_config ~= nil then
442
+ log_config = user_config
427
443
else
428
444
log_config = global_config
429
445
end
You can’t perform that action at this time.
0 commit comments