diff options
| author | João Távora | 2023-03-03 13:13:35 +0000 |
|---|---|---|
| committer | João Távora | 2023-03-03 13:14:34 +0000 |
| commit | 3a651773d29afb48ac4229cd19e532bd57a4ee2d (patch) | |
| tree | e122482af680b395a91badad36329d11baa0550c | |
| parent | 9e105d483fa54c5f07a42b4c0fab40507f1fd9ec (diff) | |
| download | emacs-3a651773d29afb48ac4229cd19e532bd57a4ee2d.tar.gz emacs-3a651773d29afb48ac4229cd19e532bd57a4ee2d.zip | |
Eglot: pay better attention to hints' paddingLeft/Right (bug#61924)
* lisp/progmodes/eglot.el (eglot--update-hints-1): Consider
:json-false, which is a non-nil value.
| -rw-r--r-- | lisp/icomplete.el | 1 | ||||
| -rw-r--r-- | lisp/progmodes/eglot.el | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/lisp/icomplete.el b/lisp/icomplete.el index 0adb0e5afeb..4f39afb69f4 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el | |||
| @@ -661,6 +661,7 @@ Usually run by inclusion in `minibuffer-setup-hook'." | |||
| 661 | (setq-local icomplete-hide-common-prefix nil | 661 | (setq-local icomplete-hide-common-prefix nil |
| 662 | ;; Ask `icomplete-completions' to return enough completions candidates. | 662 | ;; Ask `icomplete-completions' to return enough completions candidates. |
| 663 | icomplete-prospects-height 25 | 663 | icomplete-prospects-height 25 |
| 664 | truncate-lines t | ||
| 664 | redisplay-adhoc-scroll-in-resize-mini-windows nil)) | 665 | redisplay-adhoc-scroll-in-resize-mini-windows nil)) |
| 665 | 666 | ||
| 666 | ;;;###autoload | 667 | ;;;###autoload |
diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index b17370ebf8b..a11ec0e4bbd 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el | |||
| @@ -3603,8 +3603,10 @@ If NOERROR, return predicate, else erroring function." | |||
| 3603 | (goto-char (eglot--lsp-position-to-point position)) | 3603 | (goto-char (eglot--lsp-position-to-point position)) |
| 3604 | (when (or (> (point) to) (< (point) from)) (cl-return)) | 3604 | (when (or (> (point) to) (< (point) from)) (cl-return)) |
| 3605 | (let ((left-pad (and paddingLeft | 3605 | (let ((left-pad (and paddingLeft |
| 3606 | (not (eq paddingLeft :json-false)) | ||
| 3606 | (not (memq (char-before) '(32 9))) " ")) | 3607 | (not (memq (char-before) '(32 9))) " ")) |
| 3607 | (right-pad (and paddingRight | 3608 | (right-pad (and paddingRight |
| 3609 | (not (eq paddingRight :json-false)) | ||
| 3608 | (not (memq (char-after) '(32 9))) " "))) | 3610 | (not (memq (char-after) '(32 9))) " "))) |
| 3609 | (cl-flet | 3611 | (cl-flet |
| 3610 | ((do-it (text lpad rpad) | 3612 | ((do-it (text lpad rpad) |