Skip to content

Commit e0620c9

Browse files
authored
Merge branch 'master' into def-path
2 parents 71c2ee9 + 11add3a commit e0620c9

3 files changed

Lines changed: 15 additions & 3 deletions

File tree

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
matrix:
4444
r: [latest]
4545
# r: [3.5, 3.6, devel]
46-
runs-on: macOS-latest
46+
runs-on: macos-latest
4747
env:
4848
NOT_CRAN: true
4949
R_LANGSVR_LOG: /tmp/languageserver/macos-log

R/signature.R

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ signature_reply <- function(id, uri, workspace, document, point) {
5151
if (doc_line1 < func_line1) {
5252
comment <- document$content[doc_line1:(func_line1 - 1)]
5353
doc <- convert_comment_to_documentation(comment)
54+
doc_string <- NULL
55+
5456
if (is.character(doc)) {
5557
doc_string <- doc
5658
} else if (is.list(doc)) {
@@ -60,6 +62,11 @@ signature_reply <- function(id, uri, workspace, document, point) {
6062
doc_string <- doc$markdown
6163
}
6264
}
65+
66+
if (is.null(doc_string)) {
67+
doc_string <- ""
68+
}
69+
6370
documentation <- list(kind = "markdown", value = doc_string)
6471
}
6572

@@ -77,12 +84,18 @@ signature_reply <- function(id, uri, workspace, document, point) {
7784
logger$info("sig: ", sig)
7885
if (!is.null(sig)) {
7986
doc <- workspace$get_documentation(result$token, result$package, isf = TRUE)
80-
doc_string <- ""
87+
doc_string <- NULL
88+
8189
if (is.character(doc)) {
8290
doc_string <- doc
8391
} else if (is.list(doc)) {
8492
doc_string <- doc$description
8593
}
94+
95+
if (is.null(doc_string)) {
96+
doc_string <- ""
97+
}
98+
8699
documentation <- list(kind = "markdown", value = doc_string)
87100

88101
SignatureInformation <- list(list(

R/utils.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ path_from_uri <- function(uri) {
103103
path
104104
}
105105

106-
107106
#' @keywords internal
108107
#' @rdname path_from_uri
109108
path_to_uri <- function(path) {

0 commit comments

Comments
 (0)