[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot 53bfdb7 19/26: Per #173: adjust previous fix
From: |
Jo�o T�vora |
Subject: |
[elpa] externals/eglot 53bfdb7 19/26: Per #173: adjust previous fix |
Date: |
Sun, 9 Dec 2018 19:11:28 -0500 (EST) |
branch: externals/eglot
commit 53bfdb7087b9b4a7c79abc3863c90b6d06ecca1f
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Per #173: adjust previous fix
* eglot.el (eglot--before-change): Don't reset
eglot--last-inserted-char here.
(eglot--pre-command-hook): Do it here.
(eglot--managed-mode): Add/remove eglot--pre-command-hook to/from
pre-command-hook.
---
eglot.el | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/eglot.el b/eglot.el
index 3bb93dc..727b761 100644
--- a/eglot.el
+++ b/eglot.el
@@ -1055,6 +1055,7 @@ and just return it. PROMPT shouldn't end with a question
mark."
(add-hook 'completion-at-point-functions #'eglot-completion-at-point nil t)
(add-hook 'change-major-mode-hook 'eglot--managed-mode-onoff nil t)
(add-hook 'post-self-insert-hook 'eglot--post-self-insert-hook nil t)
+ (add-hook 'pre-command-hook 'eglot--pre-command-hook nil t)
(add-function :before-until (local 'eldoc-documentation-function)
#'eglot-eldoc-function)
(add-function :around (local 'imenu-create-index-function) #'eglot-imenu)
@@ -1072,6 +1073,7 @@ and just return it. PROMPT shouldn't end with a question
mark."
(remove-hook 'completion-at-point-functions #'eglot-completion-at-point t)
(remove-hook 'change-major-mode-hook #'eglot--managed-mode-onoff t)
(remove-hook 'post-self-insert-hook 'eglot--post-self-insert-hook t)
+ (remove-hook 'pre-command-hook 'eglot--pre-command-hook t)
(remove-function (local 'eldoc-documentation-function)
#'eglot-eldoc-function)
(remove-function (local 'imenu-create-index-function) #'eglot-imenu)
@@ -1394,6 +1396,10 @@ THINGS are either registrations or unregisterations."
"Set `eglot--last-inserted-char.'"
(setq eglot--last-inserted-char last-input-event))
+(defun eglot--pre-command-hook ()
+ "Reset `eglot--last-inserted-char.'"
+ (setq eglot--last-inserted-char nil))
+
(defun eglot--CompletionParams ()
(append
(eglot--TextDocumentPositionParams)
@@ -1424,10 +1430,7 @@ THINGS are either registrations or unregisterations."
(when (listp eglot--recent-changes)
(push `(,(eglot--pos-to-lsp-position start)
,(eglot--pos-to-lsp-position end))
- eglot--recent-changes))
- ;; Also, reset `eglot--last-inserted-char' which might be set later
- ;; by `eglot--post-self-insert-hook'.
- (setq eglot--last-inserted-char nil))
+ eglot--recent-changes)))
(defun eglot--after-change (start end pre-change-length)
"Hook onto `after-change-functions'.
- [elpa] externals/eglot updated (f291816 -> 23accee), Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 11eb256 02/26: Fix #164: CodeAction command can be a Command object (#165), Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 10b238b 03/26: Revert "Fix #164: CodeAction command can be a Command object (#165)", Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot cddab30 06/26: * eglot.el (eglot--current-column): New helper., Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 53bfdb7 19/26: Per #173: adjust previous fix,
Jo�o T�vora <=
- [elpa] externals/eglot 9fb5f0c 05/26: Per #52, #127: Improve performance of xref summary line collection, Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 5bbf884 11/26: Use eglot--dbind for destructuring, Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 81d035f 04/26: Fix #52: Use entire line as xref summary when available, Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 96169d8 18/26: Per #173: fix bug introduced by previous fix, Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 4874c22 14/26: Use javascript-typescript-langserver for typescript-mode (#174), Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 66a1704 22/26: Scratch/use elpa flymake (#178), Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot f63bedb 20/26: Fix #144: Use eglot--dbind and eglot--lambda throughout, Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 3922cf3 01/26: Per #144, #156: control strictness towards incoming LSP messages, Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 8140be5 07/26: Touch up last commit, Jo�o T�vora, 2018/12/09
- [elpa] externals/eglot 95ef9e1 08/26: Robustify tests against (M)ELPA eglot installations, Jo�o T�vora, 2018/12/09