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

master
Ahmed Shariff 4 years ago committed by GitHub
parent fee008cdfb
commit 3bb45afccb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 10
      org-roam-mode.el

@ -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

@ -449,10 +449,12 @@ 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
(point))) (org-roam-end-of-meta-data t)
(end (progn (org-next-visible-heading 1) (point)))
(point)))) (end (save-excursion
(org-next-visible-heading 1)
(point))))
(string-trim (buffer-substring-no-properties beg end)))) (string-trim (buffer-substring-no-properties beg end))))
(defun org-roam-preview-get-contents (file pt) (defun org-roam-preview-get-contents (file pt)

Loading…
Cancel
Save