Commit Graph

25 Commits

Author SHA1 Message Date
Linda_pp
f076e6a7c0 Use 'label' value when 'insertText' or 'filterText' is falsy (#1095)
* use label when filterText is falsy value

* use label when insertText is falsy value on completion done

* Revert "fix inserting "v:null" when newText in textEdit is null (#1093)"

This reverts commit 907f1c9667.

* Revert "add test case where newText is null for #1093 (#1094)"

This reverts commit e214f1cfee.
2021-03-14 01:59:08 +09:00
Linda_pp
907f1c9667 fix inserting "v:null" when newText in textEdit is null (#1093) 2021-03-13 23:32:36 +09:00
William Boman
fdb69ab913 populate location list with all modified changes in a WorkspaceEdit (#555) 2020-10-23 19:41:32 -07:00
hrsh7th
bb765bb7af Fix cursor position after text edit (#870) 2020-07-18 14:44:45 +09:00
hrsh7th
92a56292bb Support text edit with folding (#788) 2020-04-19 10:22:48 -07:00
hrsh7th
4d8cd302bb Follow vscode textEdit behavior (#764)
* Follo vscode textEdit behavior

* Remove unnecessary cursor position fixing
2020-03-25 00:56:27 +09:00
hrsh7th
651bccfab8 Fix cursor pos on appling additionalTextEdit (#726) 2020-02-21 23:35:35 +09:00
hrsh7th
415f6e685f Fix cursor pos after text edit (#724) 2020-02-17 21:39:46 +09:00
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
780e7538a4 Fix #516 2019-09-20 18:09:49 +09:00
Yasuhiro Matsumoto
ff94e63af8 Remove s:parse 2019-09-10 10:01:03 +09:00
Yasuhiro Matsumoto
4ee0799b4d Fix textEdit 2019-09-09 23:31:15 +09:00
Yasuhiro Matsumoto
3a6def04b9 Add test 2019-09-09 14:29:17 +09:00
Yasuhiro Matsumoto
e9a428d2e1 Fix textEdit 2019-09-09 13:07:20 +09:00
Yasuhiro Matsumoto
44e30a430d Use black hole register 2019-09-08 22:10:29 +09:00
Yasuhiro Matsumoto
dd36602267 Fix a bug 2019-09-07 22:47:19 +09:00
Yasuhiro Matsumoto
aebafac116 Fix a bug 2019-09-07 22:39:27 +09:00
Yasuhiro Matsumoto
13fac90000 Fix textEdit
The p comand append empty line. So when replacing text block with "\n", it need
to remove with dd.

Fixes #483
2019-09-07 22:18:49 +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
mikoto2000
e195378260 Moved TextEdit process to utils. 2019-02-23 18:10:33 +09:00