Commit Graph

9 Commits

Author SHA1 Message Date
hrsh7th 3e207c0ee4 Change text edit implementation to support \r (#718)
* Change text edit implementation to support \r

* Fix edit on unloaded buffer

* Add \r\n tests

* Fix for perf

Co-authored-by: mattn <mattn.jp@gmail.com>
2020-02-15 00:39:40 +09:00
mattn 701c734c91 Check text_edits is null (#697)
* Check text_edits is null

Some Language Server return null

* Add test for textEdit is null

* Check additionalTextEdits is null
2020-02-01 14:17:01 +09:00
Damien Radtke e566dcd160 Use "P" instead of "p" to insert text (#550)
* Use "P" instead of "p" to insert text
* Update replace command and add test case
2019-11-18 15:42:17 +01:00
Yasuhiro Matsumoto a20a0c1da8 Add test 2019-09-20 18:14:07 +09:00
Yasuhiro Matsumoto 3a6def04b9 Add test 2019-09-09 14:29:17 +09:00
Thomas Faingnaert ed304dbb8a Fix LspDocumentFormat not working as expected (#410)
* Add test

* Fix LspDocumentFormat adding newlines

* Fix manually pressing enter when formatting
2019-07-11 13:41:15 -07:00
mikoto2000 75516719d5 Fix lsp#utils#text_edit#apply_text_edits when end position was newline character. (#388) 2019-06-15 11:08:48 -07:00
Thomas Faingnaert 21d51ffb83 Fix text edits not preserving v:completed_item (#389)
* Add test to check v:completed_item after textedits

* Fix v:completed_item being reset after text edits

* Add silent to execute call in apply_text_edits
2019-05-25 12:01:24 -07:00
mikoto2000 900e8619be Fix text edit when insert empty new text (#384)
* Add test of 'lsp#utils#text_edit#apply_text_edits'.

* Fix `lsp#utils#text_edit#apply_text_edits` is delete one character when textEdit command kind is insert.

I fix the problem the apply_text_edits is deleting one character
if "textEdit['range']['start'] equals textEdit['range']['end'] and textEdit['new Text'] is empty".

* Fix tests.

- create new buffer each tests
- add test utility function `s:set_text` and `get_text`
2019-05-20 17:24:41 -07:00