neovim/test/functional/plugin
Mathias Fußenegger bdff50dee5
fix(lsp): revert text edit application order change (#29877)
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.
2024-07-27 22:30:14 +02:00
..
lsp fix(lsp): inlay hints are rendered in the correct order (#29707) 2024-07-17 16:44:53 +02:00
ccomplete_spec.lua test: improve test conventions 2024-04-23 18:17:04 +02:00
cfilter_spec.lua test: improve test conventions 2024-04-23 18:17:04 +02:00
editorconfig_spec.lua feat(editorconfig): add support for spelling_language (#28638) 2024-06-06 09:16:43 -05:00
health_spec.lua fix: change deprecation presentation 2024-05-24 11:08:00 +02:00
lsp_spec.lua fix(lsp): revert text edit application order change (#29877) 2024-07-27 22:30:14 +02:00
man_spec.lua fix(man): filter OSC 8 hyperlink markup #29171 2024-06-07 12:43:17 -07:00
matchparen_spec.lua test: improve test conventions 2024-04-23 18:17:04 +02:00
msgpack_spec.lua refactor(typval)!: remove distinction of binary and nonbinary strings 2024-06-27 11:04:04 +02:00
shada_spec.lua refactor(typval)!: remove distinction of binary and nonbinary strings 2024-06-27 11:04:04 +02:00
tohtml_spec.lua fix(tohtml): support ranges again 2024-07-16 15:07:40 +02:00
tutor_spec.lua test: improve test conventions 2024-04-23 18:17:04 +02:00
vim_syntax_spec.lua test: improve test conventions 2024-04-23 18:17:04 +02:00