File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 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)
419419 section_config = nil
420420 end
421421
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+
422436 -- Use the most locally available log config
423437 --- @type false | ' time' | ' note'
424438 local log_config
425439 if section_config ~= nil then
426440 log_config = section_config
441+ elseif user_config ~= nil then
442+ log_config = user_config
427443 else
428444 log_config = global_config
429445 end
You can’t perform that action at this time.
0 commit comments