Skip to content

Commit 5aebc1e

Browse files
committed
fix: kele-get: inhibit read-only in the render buffer
Fixes #78.
1 parent 817e524 commit 5aebc1e

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

docs/references/changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ versioning][semver].
2323

2424
- Fixed an issue where `kele-get` results buffer incorrectly prints namespace
2525
for un-namespaced resources as `nil`
26+
- Fixed an issue where `kele-get` refused to display the retrieved resource, if
27+
a buffer corresponding to that resource already exists
2628

2729
### Changed
2830

kele.el

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -883,10 +883,11 @@ context and namespace in its name."
883883
obj
884884
kele-filtered-fields)))
885885
(with-current-buffer buf
886-
(erase-buffer)
887-
(insert (yaml-encode filtered-obj))
888-
(whitespace-cleanup)
889-
(goto-char (point-min))
886+
(let ((inhibit-read-only t))
887+
(erase-buffer)
888+
(insert (yaml-encode filtered-obj))
889+
(whitespace-cleanup)
890+
(goto-char (point-min)))
890891

891892
(if (featurep 'yaml-mode) (yaml-mode)
892893
(message "[kele] For syntax highlighting, install `yaml-mode'."))

0 commit comments

Comments
 (0)