diff --git a/data/fixtures/scopes/html/tags.scope b/data/fixtures/scopes/html/tags.scope index 680eb20ef9..7343bd387e 100644 --- a/data/fixtures/scopes/html/tags.scope +++ b/data/fixtures/scopes/html/tags.scope @@ -1,20 +1,20 @@
hello
--- -[.1 Content] = -[.1 Removal] = 0:0-0:5 +[#1.1 Content] = +[#1.1 Removal] = 0:0-0:5 >-----< 0|
hello
-[.1 Insertion delimiter] = " " +[#1.1 Insertion delimiter] = " " -[.2 Content] = -[.2 Removal] = 0:10-0:16 +[#1.2 Content] = +[#1.2 Removal] = 0:10-0:16 >------< 0|
hello
-[.2 Insertion delimiter] = " " +[#1.2 Insertion delimiter] = " " -[Domain] = 0:0-0:16 +[#1 Domain] = 0:0-0:16 >----------------< 0|
hello
diff --git a/data/fixtures/scopes/javascript.jsx/tags.scope b/data/fixtures/scopes/javascript.jsx/tags.scope index 680eb20ef9..7343bd387e 100644 --- a/data/fixtures/scopes/javascript.jsx/tags.scope +++ b/data/fixtures/scopes/javascript.jsx/tags.scope @@ -1,20 +1,20 @@
hello
--- -[.1 Content] = -[.1 Removal] = 0:0-0:5 +[#1.1 Content] = +[#1.1 Removal] = 0:0-0:5 >-----< 0|
hello
-[.1 Insertion delimiter] = " " +[#1.1 Insertion delimiter] = " " -[.2 Content] = -[.2 Removal] = 0:10-0:16 +[#1.2 Content] = +[#1.2 Removal] = 0:10-0:16 >------< 0|
hello
-[.2 Insertion delimiter] = " " +[#1.2 Insertion delimiter] = " " -[Domain] = 0:0-0:16 +[#1 Domain] = 0:0-0:16 >----------------< 0|
hello
diff --git a/data/fixtures/scopes/latex/tags.scope b/data/fixtures/scopes/latex/tags.scope index 43eb2a03b0..1247b1fece 100644 --- a/data/fixtures/scopes/latex/tags.scope +++ b/data/fixtures/scopes/latex/tags.scope @@ -3,31 +3,31 @@ \end{quote} --- -[.1 Content] = 0:0-0:13 +[#1.1 Content] = 0:0-0:13 >-------------< 0| \begin{quote} -[.1 Removal] = 0:0-1:0 +[#1.1 Removal] = 0:0-1:0 >------------- 0| \begin{quote} 1| Hello < -[.1 Insertion delimiter] = " " +[#1.1 Insertion delimiter] = " " -[.2 Content] = 2:0-2:11 +[#1.2 Content] = 2:0-2:11 >-----------< 2| \end{quote} -[.2 Removal] = 1:9-2:11 +[#1.2 Removal] = 1:9-2:11 > 1| Hello 2| \end{quote} -----------< -[.2 Insertion delimiter] = " " +[#1.2 Insertion delimiter] = " " -[Domain] = 0:0-2:11 +[#1 Domain] = 0:0-2:11 >------------- 0| \begin{quote} 1| Hello diff --git a/data/fixtures/scopes/xml/tags.scope b/data/fixtures/scopes/xml/tags.scope index adc2f0e3e2..b0287ac7ce 100644 --- a/data/fixtures/scopes/xml/tags.scope +++ b/data/fixtures/scopes/xml/tags.scope @@ -1,20 +1,20 @@ Me --- -[.1 Content] = -[.1 Removal] = 0:0-0:16 +[#1.1 Content] = +[#1.1 Removal] = 0:0-0:16 >----------------< 0| Me -[.1 Insertion delimiter] = " " +[#1.1 Insertion delimiter] = " " -[.2 Content] = -[.2 Removal] = 0:18-0:25 +[#1.2 Content] = +[#1.2 Removal] = 0:18-0:25 >-------< 0| Me -[.2 Insertion delimiter] = " " +[#1.2 Insertion delimiter] = " " -[Domain] = 0:0-0:25 +[#1 Domain] = 0:0-0:25 >-------------------------< 0| Me diff --git a/packages/cursorless-vscode-e2e/src/suite/serializeScopeFixture.ts b/packages/cursorless-vscode-e2e/src/suite/serializeScopeFixture.ts index c4d9c09125..23489e75b5 100644 --- a/packages/cursorless-vscode-e2e/src/suite/serializeScopeFixture.ts +++ b/packages/cursorless-vscode-e2e/src/suite/serializeScopeFixture.ts @@ -71,6 +71,11 @@ function serializeScope( }); } + // If we're going to add a target number we need a scope number as well. + if (scopeNumber == null) { + scopeNumber = 1; + } + // If we have multiple targets or the domain is not equal to the content range: add domain last return [ ...targets.map((target, index) =>