emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/cider 430cfd40c5: [Fix #3763] Do not call cider-docstring


From: ELPA Syncer
Subject: [nongnu] elpa/cider 430cfd40c5: [Fix #3763] Do not call cider-docstring fns unless we have a doc (#3764)
Date: Mon, 23 Dec 2024 10:00:03 -0500 (EST)

branch: elpa/cider
commit 430cfd40c57ad3ba4ef39262acf411531dc734f5
Author: Vedang Manerikar <ved.manerikar@gmail.com>
Commit: GitHub <noreply@github.com>

    [Fix #3763] Do not call cider-docstring fns unless we have a doc (#3764)
    
    Sometimes, there is no "doc" attribute in the nrepl-dict. In such
    cases, `fetched-doc` is nil, which causes `cider-docstring--*`
    functions to error.
    
    We should only call these functions when we have a docstring to
    render.
---
 CHANGELOG.md | 4 ++++
 cider-doc.el | 9 +++++----
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 198b406596..6417918f10 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,10 @@
 
 ## master (unreleased)
 
+### Bugs fixed
+
+- [#3763](https://github.com/clojure-emacs/cider/issues/3763): Fix 
`cider-docview-render` completion popup error when symbol being completed does 
not have a docstring.
+
 ## 1.16.1 (2024-12-03)
 
 ### Changes
diff --git a/cider-doc.el b/cider-doc.el
index addfdeb829..d76c205e20 100644
--- a/cider-doc.el
+++ b/cider-doc.el
@@ -428,10 +428,11 @@ in a COMPACT format is specified, FOR-TOOLTIP if 
specified."
                                                             
"doc-first-sentence-fragments" (nrepl-dict-get info 
"doc-first-sentence-fragments"))))
          (fetched-doc (nrepl-dict-get info "doc"))
          (doc     (or rendered-fragments
-                      (if compact
-                          (cider-docstring--trim
-                           (cider-docstring--format fetched-doc))
-                        fetched-doc)
+                      (when fetched-doc
+                        (if compact
+                            (cider-docstring--trim
+                             (cider-docstring--format fetched-doc))
+                          fetched-doc))
                       (unless compact
                         "Not documented.")))
          (url     (nrepl-dict-get info "url"))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]