Skip to content

Commit 17f832a

Browse files
committed
Allow :ObsidianRename to move files
fixes: epwalsh#742
1 parent 14e0427 commit 17f832a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Diff for: CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818

1919
### Fixed
2020

21+
- `ObsidianRename` can be used to move notes.
2122
- Fixed an edge case with collecting backlinks.
2223
- Fixed typo in `ObsidianPasteImg`'s command description
2324
- Fixed the case when `opts.attachments` is `nil`.

Diff for: lua/obsidian/commands/rename.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ return function(client, data)
9797
new_note_path = (dirname / new_note_id):with_suffix ".md"
9898
end
9999

100-
if new_note_id == cur_note_id then
101-
log.warn "New note ID is the same, doing nothing"
100+
if new_note_path == cur_note_path then
101+
log.warn "New note ID and path are unchanged, doing nothing"
102102
return
103103
end
104104

0 commit comments

Comments
 (0)