mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
bdff50dee5
Reverts https://github.com/neovim/neovim/pull/29212 and adds a few additional test cases From the spec > All text edits ranges refer to positions in the document they are > computed on. They therefore move a document from state S1 to S2 without > describing any intermediate state. Text edits ranges must never overlap, > that means no part of the original document must be manipulated by more > than one edit. However, it is possible that multiple edits have the same > start position: multiple inserts, or any number of inserts followed by a > single remove or replace edit. If multiple inserts have the same > position, the order in the array defines the order in which the inserted > strings appear in the resulting text. The previous fix seems wrong. The important part: > If multiple inserts have the same position, the order in the array > defines the order in which the inserted strings appear in the > resulting text. Emphasis on _appear in the resulting text_ Which means that in: local edits1 = { make_edit(0, 3, 0, 3, { 'World' }), make_edit(0, 3, 0, 3, { 'Hello' }), } `World` must appear before `Hello` in the final text. That means the old logic was correct, and the fix was wrong. |
||
---|---|---|
.. | ||
lsp | ||
ccomplete_spec.lua | ||
cfilter_spec.lua | ||
editorconfig_spec.lua | ||
health_spec.lua | ||
lsp_spec.lua | ||
man_spec.lua | ||
matchparen_spec.lua | ||
msgpack_spec.lua | ||
shada_spec.lua | ||
tohtml_spec.lua | ||
tutor_spec.lua | ||
vim_syntax_spec.lua |