Fix TextEdit range (#4069)

Typo: TextEdit's range should refer to the old buffer's range rather than the new one.
This commit is contained in:
Hubert Plociniczak 2023-01-20 12:31:16 +01:00 committed by GitHub
parent a5df4d4716
commit 86eee6199d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -261,7 +261,7 @@ class CollaborativeBuffer(
// also gets a notification.
val change = FileEdit(
path,
List(TextEdit(buffer.fullRange, file.content)),
List(TextEdit(oldBuffer.fullRange, file.content)),
oldBuffer.version.toHexString,
buffer.version.toHexString
)

View File

@ -912,7 +912,7 @@ class VcsManagerTest extends BaseServerTest with RetrySpec {
},
"end" : {
"line" : 0,
"character" : 13
"character" : 12
}
},
"text" : "file contents"
@ -959,7 +959,7 @@ class VcsManagerTest extends BaseServerTest with RetrySpec {
},
"end" : {
"line" : 0,
"character" : 13
"character" : 12
}
},
"text" : "file contents"

View File

@ -31,7 +31,7 @@ object model {
*
* {{{
* 0|inc x =
* 1| x + 1
* 1| x + 1
* ^^^^^^^^^
* 012345678
* }}}