Skip to content

Commit 72989e1

Browse files
Fix last repeat date to be inactive date and fix indente of state change note.
1 parent 64397be commit 72989e1

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lua/orgmode/org/mappings.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,15 +176,15 @@ function OrgMappings:todo_next_state()
176176
Date.now():to_string()
177177
)
178178

179-
local data = item:add_properties({ LAST_REPEAT = Date.now():to_string() })
179+
local data = item:add_properties({ LAST_REPEAT = '[' .. Date.now():to_string() .. ']' })
180180
if data.is_new then
181-
vim.fn.append(data.end_line, state_change)
181+
vim.fn.append(data.end_line, data.indent .. state_change)
182182
return item
183183
end
184184
item = Files.get_current_file():get_closest_headline()
185185

186186
if item.properties.valid then
187-
vim.fn.append(item.properties.range.end_line, state_change)
187+
vim.fn.append(item.properties.range.end_line, data.indent .. state_change)
188188
end
189189
end
190190

lua/orgmode/parser/headline.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ function Headline:add_properties(properties)
154154
end
155155
return {
156156
is_new = false,
157+
indent = indent,
157158
}
158159
end
159160

@@ -173,6 +174,7 @@ function Headline:add_properties(properties)
173174
return {
174175
is_new = true,
175176
end_line = properties_line + #content,
177+
indent = indent,
176178
}
177179
end
178180

0 commit comments

Comments
 (0)