emacs-lsp / lsp-ui

UI integrations for lsp-mode
https://emacs-lsp.github.io/lsp-ui
GNU General Public License v3.0
1.04k stars 140 forks source link

lsp-ui-doc - stops undo working #415

Open dericbytes opened 4 years ago

dericbytes commented 4 years ago

Undo history corrupted when lsp-ui-doc-enabled and visible

am using typescript (latest)

Write, the following to get the docs to pop up a few times.

Math.floor() Math.floor()

then call undo 4 times, it should get caught between toggling undo/redo

I was using emacs 27. I updated to nightly 28 and did a fresh install of packages. I also did a minimal install with emacs -q.

(setq lsp-ui-doc-enable t) 
(setq lsp-ui-doc-use-childframe t) 
(setq lsp-ui-doc-position 'top) 
(setq lsp-ui-doc-include-signature t)
(setq lsp-ui-doc-use-webkit t)    
(add-hook 'lsp-mode-hook 'lsp-ui-mode)

Can send more details.

MatthewZMD commented 4 years ago

it should get caught between toggling undo/redo

Can you clarify what do you mean by getting caught?

I use lsp + typescript pretty regularly but never encounter your problem.

dericbytes commented 4 years ago

undo undoes part of the text I entered. then a following undo puts back the text. then the next removes it again.

this only happens when the docs popup, which is why I gave the example of entering Math.floor().

have you tried it with the emacs settings I provided?

MatthewZMD commented 4 years ago

undo undoes part of the text I entered. then a following undo puts back the text. then the next removes it again.

From what you described I do not see how the is it corrupted. I cannot reproduce this issue.