Skip to content

Commit

Permalink
Remove use of string-lines (#4217) (#4219)
Browse files Browse the repository at this point in the history
* Remove use of `string-lines` (#4217)

The Elisp function `string-lines` is not available prior to Emacs
version 28.1, so its presence breaks compatibility with earlier
versions.

* Use `s-lines` to split lines
  • Loading branch information
mope-life authored Nov 7, 2023
1 parent 625671a commit 10d6ea0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lsp-completion.el
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ The MARKERS and PREFIX value will be attached to each candidate."
;; `lsp-completion-start-point' above might be from cached/previous completion and
;; pointing to a very distant point, which results in `prefix' being way too long.
;; So let's consider only the first line.
(prefix (car (string-lines prefix)))
(prefix (car (s-lines prefix)))
(prefix-len (length prefix))
(prefix-pos 0)
(label (downcase candidate))
Expand Down

0 comments on commit 10d6ea0

Please sign in to comment.