diff --git a/CHANGELOG.md b/CHANGELOG.md index b585ed0e2..ea67370cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- `ObsidianRename` can be used to move notes. - Fixed an edge case with collecting backlinks. - Fixed typo in `ObsidianPasteImg`'s command description - Fixed the case when `opts.attachments` is `nil`. diff --git a/lua/obsidian/commands/rename.lua b/lua/obsidian/commands/rename.lua index b356d971d..72213d6e1 100644 --- a/lua/obsidian/commands/rename.lua +++ b/lua/obsidian/commands/rename.lua @@ -97,8 +97,8 @@ return function(client, data) new_note_path = (dirname / new_note_id):with_suffix ".md" end - if new_note_id == cur_note_id then - log.warn "New note ID is the same, doing nothing" + if new_note_path == cur_note_path then + log.warn "New note ID and path are unchanged, doing nothing" return end