[Fix #2151] org-roam-preview-default-function doesn't copy next node (#2152)

This commit is contained in:
Ahmed Shariff
2022-04-09 19:17:53 -04:00
committed by GitHub
parent fee008cdfb
commit 3bb45afccb
2 changed files with 7 additions and 4 deletions

View File

@ -7,6 +7,7 @@
### Removed ### Removed
### Fixed ### Fixed
- [#2130](https://github.com/org-roam/org-roam/pull/2130) buffer: unlinked-references section now also searches within symlinked directories - [#2130](https://github.com/org-roam/org-roam/pull/2130) buffer: unlinked-references section now also searches within symlinked directories
- [#2152](https://github.com/org-roam/org-roam/pull/2152) org-roam-preview-default-function: doesn't copy copy content of next heading node when current node's content is empty
### Changed ### Changed

View File

@ -449,9 +449,11 @@ In interactive calls OTHER-WINDOW is set with
This function returns the all contents under the current This function returns the all contents under the current
headline, up to the next headline." headline, up to the next headline."
(let ((beg (progn (org-roam-end-of-meta-data t) (let ((beg (save-excursion
(org-roam-end-of-meta-data t)
(point))) (point)))
(end (progn (org-next-visible-heading 1) (end (save-excursion
(org-next-visible-heading 1)
(point)))) (point))))
(string-trim (buffer-substring-no-properties beg end)))) (string-trim (buffer-substring-no-properties beg end))))