branch: externals/dape
commit a84361c59b34b06448b76b76b5f44048da37051a
Author: Daniel Pettersson <[email protected]>
Commit: Daniel Pettersson <[email protected]>
Workaround for completion response with bad :start
Trying to fix #289
---
dape.el | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/dape.el b/dape.el
index 0442cbb741..dacdda00db 100644
--- a/dape.el
+++ b/dape.el
@@ -4910,6 +4910,12 @@ Called by `comint-input-sender' in `dape-repl-mode'."
(or (plist-get target :text) (plist-get target :label))
(when-let* ((start (plist-get target :start))
(offset (- (car bounds) line-start))
+ ;; XXX Assume server sends both start
+ ;; and length (vscode convention) or
+ ;; bail. Seems successful in
+ ;; identifying misbehaving servers
+ ;; (e.g. jdtls).
+ ((plist-get target :length))
((< start offset)))
;; XXX Adapter gets line but Emacs completion is
;; given `word' bounds, cut prefix off candidate