From 3d9401f3170da819662a51116ce071b9d650bdb1 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Thu, 25 Nov 2021 10:56:53 +0100 Subject: [PATCH 1/7] Implementation of modulo line numbers --- src/processTargets/processMark.ts | 24 ++++++++++++++++++++---- src/typings/Types.ts | 7 ++++++- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/src/processTargets/processMark.ts b/src/processTargets/processMark.ts index 64f4efa72a..8c89251f75 100644 --- a/src/processTargets/processMark.ts +++ b/src/processTargets/processMark.ts @@ -151,10 +151,26 @@ function processDecoratedSymbol( } function processLineNumber(context: ProcessedTargetsContext, mark: LineNumber) { - const getLine = (linePosition: LineNumberPosition) => - linePosition.isRelative - ? context.currentEditor!.selection.active.line + linePosition.lineNumber - : linePosition.lineNumber; + const getLine = (linePosition: LineNumberPosition) => { + const editor = context.currentEditor!; + switch (linePosition.type) { + case "absolute": + return linePosition.lineNumber; + case "relative": + return editor.selection.active.line + linePosition.lineNumber; + case "modulo": + const { start, end } = editor.visibleRanges[0]; + const base = Math.floor(start.line / 100) * 100; + let lineNumber = base + linePosition.lineNumber; + while (lineNumber <= end.line) { + if (lineNumber >= start.line) { + return lineNumber; + } + lineNumber += 100; + } + throw new Error("Line is not visible"); + } + }; return [ { selection: new Selection( diff --git a/src/typings/Types.ts b/src/typings/Types.ts index fa6cf760b8..c452c5626d 100644 --- a/src/typings/Types.ts +++ b/src/typings/Types.ts @@ -44,9 +44,14 @@ export interface DecoratedSymbol { character: string; } +export type LineNumberType = + | "absolute" + | "relative" + | "modulo"; + export interface LineNumberPosition { lineNumber: number; - isRelative: boolean; + type: LineNumberType; } export interface LineNumber { From 0b948daa982d41c19db8a87350e4bd3d8c60f360 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Thu, 25 Nov 2021 14:01:56 +0100 Subject: [PATCH 2/7] Cleaned up line numbers --- src/processTargets/processMark.ts | 9 +++++---- src/typings/Types.ts | 7 ++----- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/processTargets/processMark.ts b/src/processTargets/processMark.ts index 8c89251f75..c43f855419 100644 --- a/src/processTargets/processMark.ts +++ b/src/processTargets/processMark.ts @@ -151,22 +151,23 @@ function processDecoratedSymbol( } function processLineNumber(context: ProcessedTargetsContext, mark: LineNumber) { + const editor = context.currentEditor!; const getLine = (linePosition: LineNumberPosition) => { - const editor = context.currentEditor!; switch (linePosition.type) { case "absolute": return linePosition.lineNumber; case "relative": return editor.selection.active.line + linePosition.lineNumber; - case "modulo": + case "modulo100": + const stepSize = 100; const { start, end } = editor.visibleRanges[0]; - const base = Math.floor(start.line / 100) * 100; + const base = Math.floor(start.line / stepSize) * stepSize; let lineNumber = base + linePosition.lineNumber; while (lineNumber <= end.line) { if (lineNumber >= start.line) { return lineNumber; } - lineNumber += 100; + lineNumber += stepSize; } throw new Error("Line is not visible"); } diff --git a/src/typings/Types.ts b/src/typings/Types.ts index c452c5626d..eee89d8bfb 100644 --- a/src/typings/Types.ts +++ b/src/typings/Types.ts @@ -44,14 +44,11 @@ export interface DecoratedSymbol { character: string; } -export type LineNumberType = - | "absolute" - | "relative" - | "modulo"; +export type LineNumberType = "absolute" | "relative" | "modulo100"; export interface LineNumberPosition { - lineNumber: number; type: LineNumberType; + lineNumber: number; } export interface LineNumber { From e209fa973762ff40f00908799be529d436894f26 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Thu, 25 Nov 2021 14:25:07 +0100 Subject: [PATCH 3/7] replaced CRLF line endings --- .../inference/bringMapAirToLineHarp.yml | 4 +-- .../inference/bringMapAirToTokenHarp.yml | 4 +-- .../inference/bringTokenHarpToMapAir.yml | 4 +-- .../recorded/languages/cpp/takeAttribute.yml | 4 +-- .../recorded/languages/cpp/takeFunkName.yml | 4 +-- .../recorded/languages/cpp/takeFunkName2.yml | 4 +-- .../recorded/languages/cpp/takeIf.yml | 4 +-- .../recorded/languages/cpp/takeIf2.yml | 4 +-- .../recorded/languages/cpp/takeItem.yml | 4 +-- .../recorded/languages/cpp/takeItem2.yml | 4 +-- .../recorded/languages/cpp/takeLambda.yml | 4 +-- .../recorded/languages/cpp/takeList.yml | 4 +-- .../recorded/languages/cpp/takeList2.yml | 4 +-- .../recorded/languages/cpp/takeName.yml | 4 +-- .../recorded/languages/cpp/takeName2.yml | 4 +-- .../recorded/languages/cpp/takeName3.yml | 4 +-- .../recorded/languages/cpp/takeState.yml | 4 +-- .../recorded/languages/cpp/takeState2.yml | 4 +-- .../recorded/languages/cpp/takeState3.yml | 4 +-- .../recorded/languages/cpp/takeString.yml | 4 +-- .../recorded/languages/cpp/takeType.yml | 4 +-- .../recorded/languages/cpp/takeType2.yml | 4 +-- .../recorded/languages/cpp/takeType3.yml | 4 +-- .../recorded/languages/cpp/takeValue.yml | 4 +-- .../recorded/languages/cpp/takeValue2.yml | 4 +-- .../recorded/languages/cpp/takeValue3.yml | 4 +-- .../recorded/languages/java/takeItem.yml | 4 +-- .../recorded/languages/json/takeItem.yml | 4 +-- .../recorded/languages/json/takeItem2.yml | 4 +-- .../recorded/languages/json/takeKey.yml | 4 +-- .../recorded/languages/json/takeList.yml | 4 +-- .../recorded/languages/json/takeString.yml | 4 +-- .../recorded/languages/json/takeValue.yml | 4 +-- .../{lineNumbers => marks}/takeDownOne.yml | 6 ++-- .../takeDownOnePastThree.yml | 6 ++-- .../fixtures/recorded/marks/takeRowFive.yml | 35 +++++++++++++++++++ .../{lineNumbers => marks}/takeRowFour.yml | 6 ++-- .../fixtures/recorded/marks/takeRowOne.yml | 35 +++++++++++++++++++ .../takeRowTwoPastDownThree.yml | 6 ++-- .../takeRowTwoPastFour.yml | 6 ++-- .../takeUpOnePastDownOne.yml | 6 ++-- .../takeUpOnePastRowFour.yml | 6 ++-- 42 files changed, 157 insertions(+), 87 deletions(-) rename src/test/suite/fixtures/recorded/{lineNumbers => marks}/takeDownOne.yml (79%) rename src/test/suite/fixtures/recorded/{lineNumbers => marks}/takeDownOnePastThree.yml (79%) create mode 100644 src/test/suite/fixtures/recorded/marks/takeRowFive.yml rename src/test/suite/fixtures/recorded/{lineNumbers => marks}/takeRowFour.yml (79%) create mode 100644 src/test/suite/fixtures/recorded/marks/takeRowOne.yml rename src/test/suite/fixtures/recorded/{lineNumbers => marks}/takeRowTwoPastDownThree.yml (79%) rename src/test/suite/fixtures/recorded/{lineNumbers => marks}/takeRowTwoPastFour.yml (79%) rename src/test/suite/fixtures/recorded/{lineNumbers => marks}/takeUpOnePastDownOne.yml (79%) rename src/test/suite/fixtures/recorded/{lineNumbers => marks}/takeUpOnePastRowFour.yml (79%) diff --git a/src/test/suite/fixtures/recorded/inference/bringMapAirToLineHarp.yml b/src/test/suite/fixtures/recorded/inference/bringMapAirToLineHarp.yml index 70eb2e7bd9..30827df1cc 100644 --- a/src/test/suite/fixtures/recorded/inference/bringMapAirToLineHarp.yml +++ b/src/test/suite/fixtures/recorded/inference/bringMapAirToLineHarp.yml @@ -11,7 +11,7 @@ command: mark: {type: decoratedSymbol, symbolColor: default, character: h} extraArgs: [] initialState: - documentContents: " hello world\r\n value = {a:2}" + documentContents: " hello world\n value = {a:2}" selections: - anchor: {line: 0, character: 0} active: {line: 0, character: 0} @@ -23,7 +23,7 @@ initialState: start: {line: 0, character: 4} end: {line: 0, character: 9} finalState: - documentContents: " {a:2}\r\n value = {a:2}" + documentContents: " {a:2}\n value = {a:2}" selections: - anchor: {line: 0, character: 0} active: {line: 0, character: 0} diff --git a/src/test/suite/fixtures/recorded/inference/bringMapAirToTokenHarp.yml b/src/test/suite/fixtures/recorded/inference/bringMapAirToTokenHarp.yml index edba8b54cf..0c7af296e5 100644 --- a/src/test/suite/fixtures/recorded/inference/bringMapAirToTokenHarp.yml +++ b/src/test/suite/fixtures/recorded/inference/bringMapAirToTokenHarp.yml @@ -11,7 +11,7 @@ command: mark: {type: decoratedSymbol, symbolColor: default, character: h} extraArgs: [] initialState: - documentContents: " hello\r\n value = {a:2}" + documentContents: " hello\n value = {a:2}" selections: - anchor: {line: 0, character: 0} active: {line: 0, character: 0} @@ -23,7 +23,7 @@ initialState: start: {line: 0, character: 4} end: {line: 0, character: 9} finalState: - documentContents: " {a:2}\r\n value = {a:2}" + documentContents: " {a:2}\n value = {a:2}" selections: - anchor: {line: 0, character: 0} active: {line: 0, character: 0} diff --git a/src/test/suite/fixtures/recorded/inference/bringTokenHarpToMapAir.yml b/src/test/suite/fixtures/recorded/inference/bringTokenHarpToMapAir.yml index d424cf2091..a1cb04bb96 100644 --- a/src/test/suite/fixtures/recorded/inference/bringTokenHarpToMapAir.yml +++ b/src/test/suite/fixtures/recorded/inference/bringTokenHarpToMapAir.yml @@ -11,7 +11,7 @@ command: mark: {type: decoratedSymbol, symbolColor: default, character: a} extraArgs: [] initialState: - documentContents: " hello\r\n value = {a:2}" + documentContents: " hello\n value = {a:2}" selections: - anchor: {line: 0, character: 0} active: {line: 0, character: 0} @@ -23,7 +23,7 @@ initialState: start: {line: 1, character: 13} end: {line: 1, character: 14} finalState: - documentContents: " hello\r\n value = hello" + documentContents: " hello\n value = hello" selections: - anchor: {line: 0, character: 0} active: {line: 0, character: 0} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeAttribute.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeAttribute.yml index f45458ef29..335669cb35 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeAttribute.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeAttribute.yml @@ -7,13 +7,13 @@ command: modifier: {type: containingScope, scopeType: attribute} extraArgs: [] initialState: - documentContents: "[[nodiscard]]\r\nint f(int a = 1) {\r\n}\r\n" + documentContents: "[[nodiscard]]\nint f(int a = 1) {\n}\n" selections: - anchor: {line: 0, character: 9} active: {line: 0, character: 9} marks: {} finalState: - documentContents: "[[nodiscard]]\r\nint f(int a = 1) {\r\n}\r\n" + documentContents: "[[nodiscard]]\nint f(int a = 1) {\n}\n" selections: - anchor: {line: 0, character: 0} active: {line: 0, character: 13} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeFunkName.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeFunkName.yml index 7d09b36788..3860d5165f 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeFunkName.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeFunkName.yml @@ -7,13 +7,13 @@ command: modifier: {type: containingScope, scopeType: functionName} extraArgs: [] initialState: - documentContents: "int f(int a, int b) {\r\n \r\n}" + documentContents: "int f(int a, int b) {\n \n}" selections: - anchor: {line: 1, character: 4} active: {line: 1, character: 4} marks: {} finalState: - documentContents: "int f(int a, int b) {\r\n \r\n}" + documentContents: "int f(int a, int b) {\n \n}" selections: - anchor: {line: 0, character: 4} active: {line: 0, character: 5} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeFunkName2.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeFunkName2.yml index d96902d746..f8e8c011a8 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeFunkName2.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeFunkName2.yml @@ -7,13 +7,13 @@ command: modifier: {type: containingScope, scopeType: functionName} extraArgs: [] initialState: - documentContents: "int C::f(int a, int b) {\r\n \r\n}" + documentContents: "int C::f(int a, int b) {\n \n}" selections: - anchor: {line: 1, character: 4} active: {line: 1, character: 4} marks: {} finalState: - documentContents: "int C::f(int a, int b) {\r\n \r\n}" + documentContents: "int C::f(int a, int b) {\n \n}" selections: - anchor: {line: 0, character: 7} active: {line: 0, character: 8} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeIf.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeIf.yml index 02ad3557b5..45da142d9f 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeIf.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeIf.yml @@ -7,13 +7,13 @@ command: modifier: {type: containingScope, scopeType: ifStatement} extraArgs: [] initialState: - documentContents: "void f() {\r\n if (true) {\r\n \r\n }\r\n}" + documentContents: "void f() {\n if (true) {\n \n }\n}" selections: - anchor: {line: 2, character: 8} active: {line: 2, character: 8} marks: {} finalState: - documentContents: "void f() {\r\n if (true) {\r\n \r\n }\r\n}" + documentContents: "void f() {\n if (true) {\n \n }\n}" selections: - anchor: {line: 1, character: 4} active: {line: 3, character: 5} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeIf2.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeIf2.yml index abc41180cc..95e20f7851 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeIf2.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeIf2.yml @@ -7,13 +7,13 @@ command: modifier: {type: containingScope, scopeType: ifStatement} extraArgs: [] initialState: - documentContents: "void f() {\r\n if constexpr (true) {\r\n \r\n }\r\n}" + documentContents: "void f() {\n if constexpr (true) {\n \n }\n}" selections: - anchor: {line: 2, character: 8} active: {line: 2, character: 8} marks: {} finalState: - documentContents: "void f() {\r\n if constexpr (true) {\r\n \r\n }\r\n}" + documentContents: "void f() {\n if constexpr (true) {\n \n }\n}" selections: - anchor: {line: 1, character: 4} active: {line: 3, character: 5} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeItem.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeItem.yml index e8fbada77c..ff3b8cc82e 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeItem.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeItem.yml @@ -7,13 +7,13 @@ command: modifier: {type: containingScope, scopeType: collectionItem} extraArgs: [] initialState: - documentContents: "void f() {\r\n std::vector v {\r\n 1 + 2,\r\n 3\r\n };\r\n}" + documentContents: "void f() {\n std::vector v {\n 1 + 2,\n 3\n };\n}" selections: - anchor: {line: 2, character: 10} active: {line: 2, character: 10} marks: {} finalState: - documentContents: "void f() {\r\n std::vector v {\r\n 1 + 2,\r\n 3\r\n };\r\n}" + documentContents: "void f() {\n std::vector v {\n 1 + 2,\n 3\n };\n}" selections: - anchor: {line: 2, character: 8} active: {line: 2, character: 13} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeItem2.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeItem2.yml index 32d4e8c1d2..63863b812c 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeItem2.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeItem2.yml @@ -7,13 +7,13 @@ command: modifier: {type: containingScope, scopeType: collectionItem} extraArgs: [] initialState: - documentContents: "void f() {\r\n int arr[] = {\r\n 1 + 2,\r\n 3\r\n };\r\n}" + documentContents: "void f() {\n int arr[] = {\n 1 + 2,\n 3\n };\n}" selections: - anchor: {line: 2, character: 11} active: {line: 2, character: 11} marks: {} finalState: - documentContents: "void f() {\r\n int arr[] = {\r\n 1 + 2,\r\n 3\r\n };\r\n}" + documentContents: "void f() {\n int arr[] = {\n 1 + 2,\n 3\n };\n}" selections: - anchor: {line: 2, character: 8} active: {line: 2, character: 13} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeLambda.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeLambda.yml index 41db22137b..f5c6cdd4b3 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeLambda.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeLambda.yml @@ -7,13 +7,13 @@ command: modifier: {type: containingScope, scopeType: anonymousFunction} extraArgs: [] initialState: - documentContents: "void f() {\r\n [](){}();\r\n}\r\n" + documentContents: "void f() {\n [](){}();\n}\n" selections: - anchor: {line: 1, character: 7} active: {line: 1, character: 7} marks: {} finalState: - documentContents: "void f() {\r\n [](){}();\r\n}\r\n" + documentContents: "void f() {\n [](){}();\n}\n" selections: - anchor: {line: 1, character: 4} active: {line: 1, character: 10} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeList.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeList.yml index 9db908dac6..03ad216fd1 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeList.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeList.yml @@ -7,13 +7,13 @@ command: modifier: {type: containingScope, scopeType: list} extraArgs: [] initialState: - documentContents: "void f() {\r\n std::vector v {\r\n 1 + 2,\r\n 3\r\n };\r\n}" + documentContents: "void f() {\n std::vector v {\n 1 + 2,\n 3\n };\n}" selections: - anchor: {line: 2, character: 11} active: {line: 2, character: 11} marks: {} finalState: - documentContents: "void f() {\r\n std::vector v {\r\n 1 + 2,\r\n 3\r\n };\r\n}" + documentContents: "void f() {\n std::vector v {\n 1 + 2,\n 3\n };\n}" selections: - anchor: {line: 1, character: 23} active: {line: 4, character: 5} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeList2.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeList2.yml index ec783c92c9..41368d8b64 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeList2.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeList2.yml @@ -7,13 +7,13 @@ command: modifier: {type: containingScope, scopeType: list} extraArgs: [] initialState: - documentContents: "void f() {\r\n int arr[] = {\r\n 1 + 2,\r\n 3\r\n };\r\n}" + documentContents: "void f() {\n int arr[] = {\n 1 + 2,\n 3\n };\n}" selections: - anchor: {line: 2, character: 12} active: {line: 2, character: 12} marks: {} finalState: - documentContents: "void f() {\r\n int arr[] = {\r\n 1 + 2,\r\n 3\r\n };\r\n}" + documentContents: "void f() {\n int arr[] = {\n 1 + 2,\n 3\n };\n}" selections: - anchor: {line: 1, character: 16} active: {line: 4, character: 5} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeName.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeName.yml index ff170f51a3..385f69464d 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeName.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeName.yml @@ -7,13 +7,13 @@ command: modifier: {type: containingScope, scopeType: name} extraArgs: [] initialState: - documentContents: "void f() {\r\n int i = 1;\r\n}" + documentContents: "void f() {\n int i = 1;\n}" selections: - anchor: {line: 1, character: 13} active: {line: 1, character: 13} marks: {} finalState: - documentContents: "void f() {\r\n int i = 1;\r\n}" + documentContents: "void f() {\n int i = 1;\n}" selections: - anchor: {line: 1, character: 8} active: {line: 1, character: 9} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeName2.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeName2.yml index 84c3512966..005228023b 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeName2.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeName2.yml @@ -7,13 +7,13 @@ command: modifier: {type: containingScope, scopeType: name} extraArgs: [] initialState: - documentContents: "void f(int i = 1) {\r\n \r\n}" + documentContents: "void f(int i = 1) {\n \n}" selections: - anchor: {line: 0, character: 15} active: {line: 0, character: 15} marks: {} finalState: - documentContents: "void f(int i = 1) {\r\n \r\n}" + documentContents: "void f(int i = 1) {\n \n}" selections: - anchor: {line: 0, character: 11} active: {line: 0, character: 12} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeName3.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeName3.yml index 27fa97c1de..4414d7bb15 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeName3.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeName3.yml @@ -7,13 +7,13 @@ command: modifier: {type: containingScope, scopeType: name} extraArgs: [] initialState: - documentContents: "void f(int i = 1) {\r\n \r\n}" + documentContents: "void f(int i = 1) {\n \n}" selections: - anchor: {line: 1, character: 4} active: {line: 1, character: 4} marks: {} finalState: - documentContents: "void f(int i = 1) {\r\n \r\n}" + documentContents: "void f(int i = 1) {\n \n}" selections: - anchor: {line: 0, character: 5} active: {line: 0, character: 6} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeState.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeState.yml index b134cf0724..f389d0fed8 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeState.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeState.yml @@ -7,13 +7,13 @@ command: modifier: {type: containingScope, scopeType: statement} extraArgs: [] initialState: - documentContents: "void f() {\r\n while (true) {\r\n ;\r\n }\r\n}" + documentContents: "void f() {\n while (true) {\n ;\n }\n}" selections: - anchor: {line: 1, character: 7} active: {line: 1, character: 7} marks: {} finalState: - documentContents: "void f() {\r\n while (true) {\r\n ;\r\n }\r\n}" + documentContents: "void f() {\n while (true) {\n ;\n }\n}" selections: - anchor: {line: 1, character: 4} active: {line: 3, character: 5} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeState2.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeState2.yml index 8e8d2e4079..bfc27e6824 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeState2.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeState2.yml @@ -7,13 +7,13 @@ command: modifier: {type: containingScope, scopeType: statement} extraArgs: [] initialState: - documentContents: "void f() {\r\n a = 1;\r\n}" + documentContents: "void f() {\n a = 1;\n}" selections: - anchor: {line: 1, character: 7} active: {line: 1, character: 7} marks: {} finalState: - documentContents: "void f() {\r\n a = 1;\r\n}" + documentContents: "void f() {\n a = 1;\n}" selections: - anchor: {line: 1, character: 4} active: {line: 1, character: 10} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeState3.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeState3.yml index a3ce6c2b41..eedff7a5b6 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeState3.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeState3.yml @@ -7,13 +7,13 @@ command: modifier: {type: containingScope, scopeType: statement} extraArgs: [] initialState: - documentContents: "void f() {\r\n int a = 1;\r\n}" + documentContents: "void f() {\n int a = 1;\n}" selections: - anchor: {line: 1, character: 10} active: {line: 1, character: 10} marks: {} finalState: - documentContents: "void f() {\r\n int a = 1;\r\n}" + documentContents: "void f() {\n int a = 1;\n}" selections: - anchor: {line: 1, character: 4} active: {line: 1, character: 14} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeString.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeString.yml index 66b68a9c2d..96b43849ea 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeString.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeString.yml @@ -7,13 +7,13 @@ command: modifier: {type: containingScope, scopeType: string} extraArgs: [] initialState: - documentContents: "char* a = \"hello world\";\r\n" + documentContents: "char* a = \"hello world\";\n" selections: - anchor: {line: 0, character: 21} active: {line: 0, character: 21} marks: {} finalState: - documentContents: "char* a = \"hello world\";\r\n" + documentContents: "char* a = \"hello world\";\n" selections: - anchor: {line: 0, character: 10} active: {line: 0, character: 23} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeType.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeType.yml index 590fd23894..565ab0b094 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeType.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeType.yml @@ -7,13 +7,13 @@ command: modifier: {type: containingScope, scopeType: type} extraArgs: [] initialState: - documentContents: "int f(int a) {}\r\n" + documentContents: "int f(int a) {}\n" selections: - anchor: {line: 0, character: 10} active: {line: 0, character: 10} marks: {} finalState: - documentContents: "int f(int a) {}\r\n" + documentContents: "int f(int a) {}\n" selections: - anchor: {line: 0, character: 6} active: {line: 0, character: 9} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeType2.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeType2.yml index 685f8c8fbc..eb169585fc 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeType2.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeType2.yml @@ -7,13 +7,13 @@ command: modifier: {type: containingScope, scopeType: type} extraArgs: [] initialState: - documentContents: "int f(int a) {}\r\n" + documentContents: "int f(int a) {}\n" selections: - anchor: {line: 0, character: 14} active: {line: 0, character: 14} marks: {} finalState: - documentContents: "int f(int a) {}\r\n" + documentContents: "int f(int a) {}\n" selections: - anchor: {line: 0, character: 0} active: {line: 0, character: 3} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeType3.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeType3.yml index 56a9433c2b..a06291bf82 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeType3.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeType3.yml @@ -7,13 +7,13 @@ command: modifier: {type: containingScope, scopeType: type} extraArgs: [] initialState: - documentContents: "int f(int a) {\r\n int j = a;\r\n}\r\n" + documentContents: "int f(int a) {\n int j = a;\n}\n" selections: - anchor: {line: 1, character: 13} active: {line: 1, character: 13} marks: {} finalState: - documentContents: "int f(int a) {\r\n int j = a;\r\n}\r\n" + documentContents: "int f(int a) {\n int j = a;\n}\n" selections: - anchor: {line: 1, character: 4} active: {line: 1, character: 7} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeValue.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeValue.yml index 225de7cf40..c312c33863 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeValue.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeValue.yml @@ -7,13 +7,13 @@ command: modifier: {type: containingScope, scopeType: value} extraArgs: [] initialState: - documentContents: "int f(int a) {\r\n int j = a;\r\n}\r\n" + documentContents: "int f(int a) {\n int j = a;\n}\n" selections: - anchor: {line: 1, character: 5} active: {line: 1, character: 5} marks: {} finalState: - documentContents: "int f(int a) {\r\n int j = a;\r\n}\r\n" + documentContents: "int f(int a) {\n int j = a;\n}\n" selections: - anchor: {line: 1, character: 12} active: {line: 1, character: 13} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeValue2.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeValue2.yml index 896e604467..4b7fd50570 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeValue2.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeValue2.yml @@ -7,13 +7,13 @@ command: modifier: {type: containingScope, scopeType: value} extraArgs: [] initialState: - documentContents: "int f(int a) {\r\n a = 2;\r\n}\r\n" + documentContents: "int f(int a) {\n a = 2;\n}\n" selections: - anchor: {line: 1, character: 5} active: {line: 1, character: 5} marks: {} finalState: - documentContents: "int f(int a) {\r\n a = 2;\r\n}\r\n" + documentContents: "int f(int a) {\n a = 2;\n}\n" selections: - anchor: {line: 1, character: 8} active: {line: 1, character: 9} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeValue3.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeValue3.yml index c8de3737eb..f74730af90 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeValue3.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeValue3.yml @@ -7,13 +7,13 @@ command: modifier: {type: containingScope, scopeType: value} extraArgs: [] initialState: - documentContents: "int f(int a = 1) {\r\n}\r\n" + documentContents: "int f(int a = 1) {\n}\n" selections: - anchor: {line: 0, character: 11} active: {line: 0, character: 11} marks: {} finalState: - documentContents: "int f(int a = 1) {\r\n}\r\n" + documentContents: "int f(int a = 1) {\n}\n" selections: - anchor: {line: 0, character: 14} active: {line: 0, character: 15} diff --git a/src/test/suite/fixtures/recorded/languages/java/takeItem.yml b/src/test/suite/fixtures/recorded/languages/java/takeItem.yml index 10ada21e47..1534e5ec3e 100644 --- a/src/test/suite/fixtures/recorded/languages/java/takeItem.yml +++ b/src/test/suite/fixtures/recorded/languages/java/takeItem.yml @@ -7,13 +7,13 @@ command: modifier: {type: containingScope, scopeType: collectionItem} extraArgs: [] initialState: - documentContents: "\r\nint[] values = {1, 2, 3};\r\n" + documentContents: "\nint[] values = {1, 2, 3};\n" selections: - anchor: {line: 1, character: 16} active: {line: 1, character: 16} marks: {} finalState: - documentContents: "\r\nint[] values = {1, 2, 3};\r\n" + documentContents: "\nint[] values = {1, 2, 3};\n" selections: - anchor: {line: 1, character: 16} active: {line: 1, character: 17} diff --git a/src/test/suite/fixtures/recorded/languages/json/takeItem.yml b/src/test/suite/fixtures/recorded/languages/json/takeItem.yml index 383202b58a..bd2c6b669a 100644 --- a/src/test/suite/fixtures/recorded/languages/json/takeItem.yml +++ b/src/test/suite/fixtures/recorded/languages/json/takeItem.yml @@ -7,13 +7,13 @@ command: modifier: {type: containingScope, scopeType: collectionItem} extraArgs: [] initialState: - documentContents: "\r\n{\r\n \"foo\": \"bar\"\r\n}\r\n" + documentContents: "\n{\n \"foo\": \"bar\"\n}\n" selections: - anchor: {line: 2, character: 9} active: {line: 2, character: 9} marks: {} finalState: - documentContents: "\r\n{\r\n \"foo\": \"bar\"\r\n}\r\n" + documentContents: "\n{\n \"foo\": \"bar\"\n}\n" selections: - anchor: {line: 2, character: 4} active: {line: 2, character: 16} diff --git a/src/test/suite/fixtures/recorded/languages/json/takeItem2.yml b/src/test/suite/fixtures/recorded/languages/json/takeItem2.yml index 621a78b1db..df8bb64c0a 100644 --- a/src/test/suite/fixtures/recorded/languages/json/takeItem2.yml +++ b/src/test/suite/fixtures/recorded/languages/json/takeItem2.yml @@ -7,13 +7,13 @@ command: modifier: {type: containingScope, scopeType: collectionItem} extraArgs: [] initialState: - documentContents: "\r\n{\r\n \"foo\": [1, 2, 3]\r\n}\r\n" + documentContents: "\n{\n \"foo\": [1, 2, 3]\n}\n" selections: - anchor: {line: 2, character: 13} active: {line: 2, character: 13} marks: {} finalState: - documentContents: "\r\n{\r\n \"foo\": [1, 2, 3]\r\n}\r\n" + documentContents: "\n{\n \"foo\": [1, 2, 3]\n}\n" selections: - anchor: {line: 2, character: 12} active: {line: 2, character: 13} diff --git a/src/test/suite/fixtures/recorded/languages/json/takeKey.yml b/src/test/suite/fixtures/recorded/languages/json/takeKey.yml index 94c647655b..2ac271ec68 100644 --- a/src/test/suite/fixtures/recorded/languages/json/takeKey.yml +++ b/src/test/suite/fixtures/recorded/languages/json/takeKey.yml @@ -7,13 +7,13 @@ command: modifier: {type: containingScope, scopeType: collectionKey} extraArgs: [] initialState: - documentContents: "\r\n{\r\n \"foo\": \"bar\"\r\n}\r\n" + documentContents: "\n{\n \"foo\": \"bar\"\n}\n" selections: - anchor: {line: 2, character: 10} active: {line: 2, character: 10} marks: {} finalState: - documentContents: "\r\n{\r\n \"foo\": \"bar\"\r\n}\r\n" + documentContents: "\n{\n \"foo\": \"bar\"\n}\n" selections: - anchor: {line: 2, character: 4} active: {line: 2, character: 9} diff --git a/src/test/suite/fixtures/recorded/languages/json/takeList.yml b/src/test/suite/fixtures/recorded/languages/json/takeList.yml index d604ec20e0..1738a9f249 100644 --- a/src/test/suite/fixtures/recorded/languages/json/takeList.yml +++ b/src/test/suite/fixtures/recorded/languages/json/takeList.yml @@ -7,13 +7,13 @@ command: modifier: {type: containingScope, scopeType: list} extraArgs: [] initialState: - documentContents: "\r\n{\r\n \"foo\": [1, 2, 3]\r\n}\r\n" + documentContents: "\n{\n \"foo\": [1, 2, 3]\n}\n" selections: - anchor: {line: 2, character: 19} active: {line: 2, character: 19} marks: {} finalState: - documentContents: "\r\n{\r\n \"foo\": [1, 2, 3]\r\n}\r\n" + documentContents: "\n{\n \"foo\": [1, 2, 3]\n}\n" selections: - anchor: {line: 2, character: 11} active: {line: 2, character: 20} diff --git a/src/test/suite/fixtures/recorded/languages/json/takeString.yml b/src/test/suite/fixtures/recorded/languages/json/takeString.yml index e6050d297f..29631499b7 100644 --- a/src/test/suite/fixtures/recorded/languages/json/takeString.yml +++ b/src/test/suite/fixtures/recorded/languages/json/takeString.yml @@ -7,13 +7,13 @@ command: modifier: {type: containingScope, scopeType: string} extraArgs: [] initialState: - documentContents: "\r\n{\r\n \"foo\": \"bar\"\r\n}\r\n" + documentContents: "\n{\n \"foo\": \"bar\"\n}\n" selections: - anchor: {line: 2, character: 12} active: {line: 2, character: 12} marks: {} finalState: - documentContents: "\r\n{\r\n \"foo\": \"bar\"\r\n}\r\n" + documentContents: "\n{\n \"foo\": \"bar\"\n}\n" selections: - anchor: {line: 2, character: 11} active: {line: 2, character: 16} diff --git a/src/test/suite/fixtures/recorded/languages/json/takeValue.yml b/src/test/suite/fixtures/recorded/languages/json/takeValue.yml index 96d4a9d2e5..3c4f09ce7d 100644 --- a/src/test/suite/fixtures/recorded/languages/json/takeValue.yml +++ b/src/test/suite/fixtures/recorded/languages/json/takeValue.yml @@ -7,13 +7,13 @@ command: modifier: {type: containingScope, scopeType: value} extraArgs: [] initialState: - documentContents: "\r\n{\r\n \"foo\": \"bar\"\r\n}\r\n" + documentContents: "\n{\n \"foo\": \"bar\"\n}\n" selections: - anchor: {line: 2, character: 9} active: {line: 2, character: 9} marks: {} finalState: - documentContents: "\r\n{\r\n \"foo\": \"bar\"\r\n}\r\n" + documentContents: "\n{\n \"foo\": \"bar\"\n}\n" selections: - anchor: {line: 2, character: 11} active: {line: 2, character: 16} diff --git a/src/test/suite/fixtures/recorded/lineNumbers/takeDownOne.yml b/src/test/suite/fixtures/recorded/marks/takeDownOne.yml similarity index 79% rename from src/test/suite/fixtures/recorded/lineNumbers/takeDownOne.yml rename to src/test/suite/fixtures/recorded/marks/takeDownOne.yml index 3aa62d160b..39a010952c 100644 --- a/src/test/suite/fixtures/recorded/lineNumbers/takeDownOne.yml +++ b/src/test/suite/fixtures/recorded/marks/takeDownOne.yml @@ -7,8 +7,8 @@ command: selectionType: line mark: type: lineNumber - anchor: {lineNumber: 1, isRelative: true} - active: {lineNumber: 1, isRelative: true} + anchor: {lineNumber: 1, type: "relative"} + active: {lineNumber: 1, type: "relative"} extraArgs: [] initialState: documentContents: | @@ -32,4 +32,4 @@ finalState: thatMark: - anchor: {line: 1, character: 0} active: {line: 1, character: 28} -fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: line, position: contents, modifier: {type: lineNumber, anchor: {lineNumber: 1, isRelative: true}, active: {lineNumber: 1, isRelative: true}}, insideOutsideType: inside}] +fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: line, position: contents, modifier: {type: lineNumber, anchor: {lineNumber: 1, type: "relative"}, active: {lineNumber: 1, type: "relative"}}, insideOutsideType: inside}] diff --git a/src/test/suite/fixtures/recorded/lineNumbers/takeDownOnePastThree.yml b/src/test/suite/fixtures/recorded/marks/takeDownOnePastThree.yml similarity index 79% rename from src/test/suite/fixtures/recorded/lineNumbers/takeDownOnePastThree.yml rename to src/test/suite/fixtures/recorded/marks/takeDownOnePastThree.yml index fe120fd6c1..dc650a18e0 100644 --- a/src/test/suite/fixtures/recorded/lineNumbers/takeDownOnePastThree.yml +++ b/src/test/suite/fixtures/recorded/marks/takeDownOnePastThree.yml @@ -7,8 +7,8 @@ command: selectionType: line mark: type: lineNumber - anchor: {lineNumber: 1, isRelative: true} - active: {lineNumber: 3, isRelative: true} + anchor: {lineNumber: 1, type: "relative"} + active: {lineNumber: 3, type: "relative"} extraArgs: [] initialState: documentContents: | @@ -32,4 +32,4 @@ finalState: thatMark: - anchor: {line: 1, character: 0} active: {line: 3, character: 28} -fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: line, position: contents, modifier: {type: lineNumber, anchor: {lineNumber: 1, isRelative: true}, active: {lineNumber: 3, isRelative: true}}, insideOutsideType: inside}] +fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: line, position: contents, modifier: {type: lineNumber, anchor: {lineNumber: 1, type: "relative"}, active: {lineNumber: 3, type: "relative"}}, insideOutsideType: inside}] diff --git a/src/test/suite/fixtures/recorded/marks/takeRowFive.yml b/src/test/suite/fixtures/recorded/marks/takeRowFive.yml new file mode 100644 index 0000000000..8de57dc56e --- /dev/null +++ b/src/test/suite/fixtures/recorded/marks/takeRowFive.yml @@ -0,0 +1,35 @@ +spokenForm: take row five +languageId: typescript +command: + actionName: setSelection + partialTargets: + - type: primitive + selectionType: line + mark: + type: lineNumber + anchor: {lineNumber: 4, type: modulo100} + active: {lineNumber: 4, type: modulo100} + extraArgs: [] +initialState: + documentContents: |+ + + + + + selections: + - anchor: {line: 0, character: 0} + active: {line: 0, character: 0} + marks: {} +finalState: + documentContents: |+ + + + + + selections: + - anchor: {line: 4, character: 0} + active: {line: 4, character: 0} + thatMark: + - anchor: {line: 4, character: 0} + active: {line: 4, character: 0} +fullTargets: [{type: primitive, mark: {type: lineNumber, anchor: {lineNumber: 4, type: modulo100}, active: {lineNumber: 4, type: modulo100}}, selectionType: line, position: contents, insideOutsideType: inside, modifier: {type: identity}}] diff --git a/src/test/suite/fixtures/recorded/lineNumbers/takeRowFour.yml b/src/test/suite/fixtures/recorded/marks/takeRowFour.yml similarity index 79% rename from src/test/suite/fixtures/recorded/lineNumbers/takeRowFour.yml rename to src/test/suite/fixtures/recorded/marks/takeRowFour.yml index 0242646566..5fd8cbe2d9 100644 --- a/src/test/suite/fixtures/recorded/lineNumbers/takeRowFour.yml +++ b/src/test/suite/fixtures/recorded/marks/takeRowFour.yml @@ -7,8 +7,8 @@ command: selectionType: line mark: type: lineNumber - anchor: {lineNumber: 3, isRelative: false} - active: {lineNumber: 3, isRelative: false} + anchor: {lineNumber: 3, type: "absolute"} + active: {lineNumber: 3, type: "absolute"} extraArgs: [] initialState: documentContents: | @@ -32,4 +32,4 @@ finalState: thatMark: - anchor: {line: 3, character: 0} active: {line: 3, character: 28} -fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: line, position: contents, modifier: {type: lineNumber, anchor: {lineNumber: 3, isRelative: false}, active: {lineNumber: 3, isRelative: false}}, insideOutsideType: inside}] +fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: line, position: contents, modifier: {type: lineNumber, anchor: {lineNumber: 3, type: "absolute"}, active: {lineNumber: 3, type: "absolute"}}, insideOutsideType: inside}] diff --git a/src/test/suite/fixtures/recorded/marks/takeRowOne.yml b/src/test/suite/fixtures/recorded/marks/takeRowOne.yml new file mode 100644 index 0000000000..29b747cb0f --- /dev/null +++ b/src/test/suite/fixtures/recorded/marks/takeRowOne.yml @@ -0,0 +1,35 @@ +spokenForm: take row one +languageId: typescript +command: + actionName: setSelection + partialTargets: + - type: primitive + selectionType: line + mark: + type: lineNumber + anchor: {lineNumber: 0, type: modulo100} + active: {lineNumber: 0, type: modulo100} + extraArgs: [] +initialState: + documentContents: |+ + + + + + selections: + - anchor: {line: 4, character: 0} + active: {line: 4, character: 0} + marks: {} +finalState: + documentContents: |+ + + + + + selections: + - anchor: {line: 0, character: 0} + active: {line: 0, character: 0} + thatMark: + - anchor: {line: 0, character: 0} + active: {line: 0, character: 0} +fullTargets: [{type: primitive, mark: {type: lineNumber, anchor: {lineNumber: 0, type: modulo100}, active: {lineNumber: 0, type: modulo100}}, selectionType: line, position: contents, insideOutsideType: inside, modifier: {type: identity}}] diff --git a/src/test/suite/fixtures/recorded/lineNumbers/takeRowTwoPastDownThree.yml b/src/test/suite/fixtures/recorded/marks/takeRowTwoPastDownThree.yml similarity index 79% rename from src/test/suite/fixtures/recorded/lineNumbers/takeRowTwoPastDownThree.yml rename to src/test/suite/fixtures/recorded/marks/takeRowTwoPastDownThree.yml index c51da39c56..d793d2323b 100644 --- a/src/test/suite/fixtures/recorded/lineNumbers/takeRowTwoPastDownThree.yml +++ b/src/test/suite/fixtures/recorded/marks/takeRowTwoPastDownThree.yml @@ -7,8 +7,8 @@ command: selectionType: line mark: type: lineNumber - anchor: {lineNumber: 1, isRelative: false} - active: {lineNumber: 3, isRelative: true} + anchor: {lineNumber: 1, type: "absolute"} + active: {lineNumber: 3, type: "relative"} extraArgs: [] initialState: documentContents: | @@ -32,4 +32,4 @@ finalState: thatMark: - anchor: {line: 1, character: 0} active: {line: 3, character: 28} -fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: line, position: contents, modifier: {type: lineNumber, anchor: {lineNumber: 1, isRelative: false}, active: {lineNumber: 3, isRelative: true}}, insideOutsideType: inside}] +fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: line, position: contents, modifier: {type: lineNumber, anchor: {lineNumber: 1, type: "absolute"}, active: {lineNumber: 3, type: "relative"}}, insideOutsideType: inside}] diff --git a/src/test/suite/fixtures/recorded/lineNumbers/takeRowTwoPastFour.yml b/src/test/suite/fixtures/recorded/marks/takeRowTwoPastFour.yml similarity index 79% rename from src/test/suite/fixtures/recorded/lineNumbers/takeRowTwoPastFour.yml rename to src/test/suite/fixtures/recorded/marks/takeRowTwoPastFour.yml index ef3b2739c2..2f95f94afc 100644 --- a/src/test/suite/fixtures/recorded/lineNumbers/takeRowTwoPastFour.yml +++ b/src/test/suite/fixtures/recorded/marks/takeRowTwoPastFour.yml @@ -7,8 +7,8 @@ command: selectionType: line mark: type: lineNumber - anchor: {lineNumber: 1, isRelative: false} - active: {lineNumber: 3, isRelative: false} + anchor: {lineNumber: 1, type: "absolute"} + active: {lineNumber: 3, type: "absolute"} extraArgs: [] initialState: documentContents: | @@ -32,4 +32,4 @@ finalState: thatMark: - anchor: {line: 1, character: 0} active: {line: 3, character: 28} -fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: line, position: contents, modifier: {type: lineNumber, anchor: {lineNumber: 1, isRelative: false}, active: {lineNumber: 3, isRelative: false}}, insideOutsideType: inside}] +fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: line, position: contents, modifier: {type: lineNumber, anchor: {lineNumber: 1, type: "absolute"}, active: {lineNumber: 3, type: "absolute"}}, insideOutsideType: inside}] diff --git a/src/test/suite/fixtures/recorded/lineNumbers/takeUpOnePastDownOne.yml b/src/test/suite/fixtures/recorded/marks/takeUpOnePastDownOne.yml similarity index 79% rename from src/test/suite/fixtures/recorded/lineNumbers/takeUpOnePastDownOne.yml rename to src/test/suite/fixtures/recorded/marks/takeUpOnePastDownOne.yml index 64ed304d19..7a5337eec1 100644 --- a/src/test/suite/fixtures/recorded/lineNumbers/takeUpOnePastDownOne.yml +++ b/src/test/suite/fixtures/recorded/marks/takeUpOnePastDownOne.yml @@ -7,8 +7,8 @@ command: selectionType: line mark: type: lineNumber - anchor: {lineNumber: -1, isRelative: true} - active: {lineNumber: 1, isRelative: true} + anchor: {lineNumber: -1, type: "relative"} + active: {lineNumber: 1, type: "relative"} extraArgs: [] initialState: documentContents: | @@ -32,4 +32,4 @@ finalState: thatMark: - anchor: {line: 1, character: 0} active: {line: 3, character: 28} -fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: line, position: contents, modifier: {type: lineNumber, anchor: {lineNumber: -1, isRelative: true}, active: {lineNumber: 1, isRelative: true}}, insideOutsideType: inside}] +fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: line, position: contents, modifier: {type: lineNumber, anchor: {lineNumber: -1, type: "relative"}, active: {lineNumber: 1, type: "relative"}}, insideOutsideType: inside}] diff --git a/src/test/suite/fixtures/recorded/lineNumbers/takeUpOnePastRowFour.yml b/src/test/suite/fixtures/recorded/marks/takeUpOnePastRowFour.yml similarity index 79% rename from src/test/suite/fixtures/recorded/lineNumbers/takeUpOnePastRowFour.yml rename to src/test/suite/fixtures/recorded/marks/takeUpOnePastRowFour.yml index 78cbc4e7d8..505c0b37e1 100644 --- a/src/test/suite/fixtures/recorded/lineNumbers/takeUpOnePastRowFour.yml +++ b/src/test/suite/fixtures/recorded/marks/takeUpOnePastRowFour.yml @@ -7,8 +7,8 @@ command: selectionType: line mark: type: lineNumber - anchor: {lineNumber: -1, isRelative: true} - active: {lineNumber: 3, isRelative: false} + anchor: {lineNumber: -1, type: "relative"} + active: {lineNumber: 3, type: "absolute"} extraArgs: [] initialState: documentContents: | @@ -32,4 +32,4 @@ finalState: thatMark: - anchor: {line: 1, character: 0} active: {line: 3, character: 28} -fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: line, position: contents, modifier: {type: lineNumber, anchor: {lineNumber: -1, isRelative: true}, active: {lineNumber: 3, isRelative: false}}, insideOutsideType: inside}] +fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: line, position: contents, modifier: {type: lineNumber, anchor: {lineNumber: -1, type: "relative"}, active: {lineNumber: 3, type: "absolute"}}, insideOutsideType: inside}] From c7a12d9e70bde63fc746103ada4690d807084e10 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Thu, 25 Nov 2021 15:37:09 +0100 Subject: [PATCH 4/7] Handled folded regions --- src/processTargets/processMark.ts | 41 +++++++++++++++++++------------ 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/src/processTargets/processMark.ts b/src/processTargets/processMark.ts index c43f855419..06c3debe26 100644 --- a/src/processTargets/processMark.ts +++ b/src/processTargets/processMark.ts @@ -1,3 +1,4 @@ +import { result } from "lodash"; import { Range, Selection } from "vscode"; import { DecoratedSymbol, @@ -154,22 +155,30 @@ function processLineNumber(context: ProcessedTargetsContext, mark: LineNumber) { const editor = context.currentEditor!; const getLine = (linePosition: LineNumberPosition) => { switch (linePosition.type) { - case "absolute": - return linePosition.lineNumber; - case "relative": - return editor.selection.active.line + linePosition.lineNumber; - case "modulo100": - const stepSize = 100; - const { start, end } = editor.visibleRanges[0]; - const base = Math.floor(start.line / stepSize) * stepSize; - let lineNumber = base + linePosition.lineNumber; - while (lineNumber <= end.line) { - if (lineNumber >= start.line) { - return lineNumber; - } - lineNumber += stepSize; - } - throw new Error("Line is not visible"); + case "absolute": + return linePosition.lineNumber; + case "relative": + return editor.selection.active.line + linePosition.lineNumber; + case "modulo100": + const stepSize = 100; + const { start } = editor.visibleRanges[0]; + const { end } = editor.visibleRanges[editor.visibleRanges.length - 1]; + const base = Math.floor(start.line / stepSize) * stepSize; + const results = []; + let lineNumber = base + linePosition.lineNumber; + while (lineNumber <= end.line) { + if (lineNumber >= start.line) { + results.push(lineNumber); + } + lineNumber += stepSize; + } + if (results.length === 1) { + return results[0]; + } + if (result.length > 1) { + throw new Error("Multiple lines visible"); + } + throw new Error("Line is not visible"); } }; return [ From 4cdd8e98c956ffbdabc9fb3fcf26bebb4ae6163c Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Thu, 25 Nov 2021 15:40:26 +0100 Subject: [PATCH 5/7] Handled folded regions --- src/extension.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/extension.ts b/src/extension.ts index 5dedda004e..612076a212 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -208,7 +208,8 @@ export async function activate(context: vscode.ExtensionContext) { if (editor == null || editor.document !== event.document) { return; } - const { start, end } = editor.visibleRanges[0]; + const { start } = editor.visibleRanges[0]; + const { end } = editor.visibleRanges[editor.visibleRanges.length - 1]; const ranges = []; for (const edit of event.contentChanges) { if ( From 3738cb7a3363260fbec362543ee1c716b8e2a33c Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Fri, 26 Nov 2021 19:03:57 +0100 Subject: [PATCH 6/7] Properly handle folded regions --- src/processTargets/processMark.ts | 36 ++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/src/processTargets/processMark.ts b/src/processTargets/processMark.ts index 06c3debe26..acbf5f5c3a 100644 --- a/src/processTargets/processMark.ts +++ b/src/processTargets/processMark.ts @@ -161,24 +161,36 @@ function processLineNumber(context: ProcessedTargetsContext, mark: LineNumber) { return editor.selection.active.line + linePosition.lineNumber; case "modulo100": const stepSize = 100; - const { start } = editor.visibleRanges[0]; - const { end } = editor.visibleRanges[editor.visibleRanges.length - 1]; - const base = Math.floor(start.line / stepSize) * stepSize; - const results = []; + const startLine = editor.visibleRanges[0].start.line; + const endLine = + editor.visibleRanges[editor.visibleRanges.length - 1].end.line; + const base = Math.floor(startLine / stepSize) * stepSize; + const visibleLines = []; + const invisibleLines = []; let lineNumber = base + linePosition.lineNumber; - while (lineNumber <= end.line) { - if (lineNumber >= start.line) { - results.push(lineNumber); + while (lineNumber <= endLine) { + if (lineNumber >= startLine) { + const visible = editor.visibleRanges.find( + (r) => lineNumber >= r.start.line && lineNumber <= r.end.line + ); + if (visible) { + visibleLines.push(lineNumber); + } else { + invisibleLines.push(lineNumber); + } } lineNumber += stepSize; } - if (results.length === 1) { - return results[0]; + if (visibleLines.length === 1) { + return visibleLines[0]; } - if (result.length > 1) { - throw new Error("Multiple lines visible"); + if (visibleLines.length + invisibleLines.length > 1) { + throw new Error("Multiple lines matching"); } - throw new Error("Line is not visible"); + if (invisibleLines.length === 1) { + return invisibleLines[0]; + } + throw new Error("Line is not in viewport"); } }; return [ From 4e1c57a116d0076a4f8793e3b7a0580d056415de Mon Sep 17 00:00:00 2001 From: Pokey Rule Date: Sat, 27 Nov 2021 13:12:00 +0000 Subject: [PATCH 7/7] Normalise recorded test cases --- .../recorded/inference/bringMapAirToLineHarp.yml | 8 ++++++-- .../inference/bringMapAirToTokenHarp.yml | 8 ++++++-- .../inference/bringTokenHarpToMapAir.yml | 8 ++++++-- .../recorded/languages/cpp/takeAttribute.yml | 10 ++++++++-- .../recorded/languages/cpp/takeFunkName.yml | 10 ++++++++-- .../recorded/languages/cpp/takeFunkName2.yml | 10 ++++++++-- .../fixtures/recorded/languages/cpp/takeIf.yml | 14 ++++++++++++-- .../fixtures/recorded/languages/cpp/takeIf2.yml | 14 ++++++++++++-- .../fixtures/recorded/languages/cpp/takeItem.yml | 16 ++++++++++++++-- .../recorded/languages/cpp/takeItem2.yml | 16 ++++++++++++++-- .../recorded/languages/cpp/takeLambda.yml | 10 ++++++++-- .../fixtures/recorded/languages/cpp/takeList.yml | 16 ++++++++++++++-- .../recorded/languages/cpp/takeList2.yml | 16 ++++++++++++++-- .../fixtures/recorded/languages/cpp/takeName.yml | 10 ++++++++-- .../recorded/languages/cpp/takeName2.yml | 10 ++++++++-- .../recorded/languages/cpp/takeName3.yml | 10 ++++++++-- .../recorded/languages/cpp/takeState.yml | 14 ++++++++++++-- .../recorded/languages/cpp/takeState2.yml | 10 ++++++++-- .../recorded/languages/cpp/takeState3.yml | 10 ++++++++-- .../recorded/languages/cpp/takeString.yml | 6 ++++-- .../fixtures/recorded/languages/cpp/takeType.yml | 6 ++++-- .../recorded/languages/cpp/takeType2.yml | 6 ++++-- .../recorded/languages/cpp/takeType3.yml | 10 ++++++++-- .../recorded/languages/cpp/takeValue.yml | 10 ++++++++-- .../recorded/languages/cpp/takeValue2.yml | 10 ++++++++-- .../recorded/languages/cpp/takeValue3.yml | 8 ++++++-- .../recorded/languages/java/takeItem.yml | 8 ++++++-- .../recorded/languages/json/takeItem.yml | 12 ++++++++++-- .../recorded/languages/json/takeItem2.yml | 12 ++++++++++-- .../fixtures/recorded/languages/json/takeKey.yml | 12 ++++++++++-- .../recorded/languages/json/takeList.yml | 12 ++++++++++-- .../recorded/languages/json/takeString.yml | 12 ++++++++++-- .../recorded/languages/json/takeValue.yml | 12 ++++++++++-- .../fixtures/recorded/marks/takeDownOne.yml | 6 +++--- .../recorded/marks/takeDownOnePastThree.yml | 6 +++--- .../fixtures/recorded/marks/takeRowFour.yml | 6 +++--- .../recorded/marks/takeRowTwoPastDownThree.yml | 6 +++--- .../recorded/marks/takeRowTwoPastFour.yml | 6 +++--- .../recorded/marks/takeUpOnePastDownOne.yml | 6 +++--- .../recorded/marks/takeUpOnePastRowFour.yml | 6 +++--- 40 files changed, 311 insertions(+), 87 deletions(-) diff --git a/src/test/suite/fixtures/recorded/inference/bringMapAirToLineHarp.yml b/src/test/suite/fixtures/recorded/inference/bringMapAirToLineHarp.yml index 30827df1cc..c9811b41e9 100644 --- a/src/test/suite/fixtures/recorded/inference/bringMapAirToLineHarp.yml +++ b/src/test/suite/fixtures/recorded/inference/bringMapAirToLineHarp.yml @@ -11,7 +11,9 @@ command: mark: {type: decoratedSymbol, symbolColor: default, character: h} extraArgs: [] initialState: - documentContents: " hello world\n value = {a:2}" + documentContents: |2- + hello world + value = {a:2} selections: - anchor: {line: 0, character: 0} active: {line: 0, character: 0} @@ -23,7 +25,9 @@ initialState: start: {line: 0, character: 4} end: {line: 0, character: 9} finalState: - documentContents: " {a:2}\n value = {a:2}" + documentContents: |2- + {a:2} + value = {a:2} selections: - anchor: {line: 0, character: 0} active: {line: 0, character: 0} diff --git a/src/test/suite/fixtures/recorded/inference/bringMapAirToTokenHarp.yml b/src/test/suite/fixtures/recorded/inference/bringMapAirToTokenHarp.yml index 0c7af296e5..69c2b584f8 100644 --- a/src/test/suite/fixtures/recorded/inference/bringMapAirToTokenHarp.yml +++ b/src/test/suite/fixtures/recorded/inference/bringMapAirToTokenHarp.yml @@ -11,7 +11,9 @@ command: mark: {type: decoratedSymbol, symbolColor: default, character: h} extraArgs: [] initialState: - documentContents: " hello\n value = {a:2}" + documentContents: |2- + hello + value = {a:2} selections: - anchor: {line: 0, character: 0} active: {line: 0, character: 0} @@ -23,7 +25,9 @@ initialState: start: {line: 0, character: 4} end: {line: 0, character: 9} finalState: - documentContents: " {a:2}\n value = {a:2}" + documentContents: |2- + {a:2} + value = {a:2} selections: - anchor: {line: 0, character: 0} active: {line: 0, character: 0} diff --git a/src/test/suite/fixtures/recorded/inference/bringTokenHarpToMapAir.yml b/src/test/suite/fixtures/recorded/inference/bringTokenHarpToMapAir.yml index a1cb04bb96..4a782e5cf9 100644 --- a/src/test/suite/fixtures/recorded/inference/bringTokenHarpToMapAir.yml +++ b/src/test/suite/fixtures/recorded/inference/bringTokenHarpToMapAir.yml @@ -11,7 +11,9 @@ command: mark: {type: decoratedSymbol, symbolColor: default, character: a} extraArgs: [] initialState: - documentContents: " hello\n value = {a:2}" + documentContents: |2- + hello + value = {a:2} selections: - anchor: {line: 0, character: 0} active: {line: 0, character: 0} @@ -23,7 +25,9 @@ initialState: start: {line: 1, character: 13} end: {line: 1, character: 14} finalState: - documentContents: " hello\n value = hello" + documentContents: |2- + hello + value = hello selections: - anchor: {line: 0, character: 0} active: {line: 0, character: 0} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeAttribute.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeAttribute.yml index 335669cb35..879915f1b1 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeAttribute.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeAttribute.yml @@ -7,13 +7,19 @@ command: modifier: {type: containingScope, scopeType: attribute} extraArgs: [] initialState: - documentContents: "[[nodiscard]]\nint f(int a = 1) {\n}\n" + documentContents: | + [[nodiscard]] + int f(int a = 1) { + } selections: - anchor: {line: 0, character: 9} active: {line: 0, character: 9} marks: {} finalState: - documentContents: "[[nodiscard]]\nint f(int a = 1) {\n}\n" + documentContents: | + [[nodiscard]] + int f(int a = 1) { + } selections: - anchor: {line: 0, character: 0} active: {line: 0, character: 13} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeFunkName.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeFunkName.yml index 3860d5165f..4842280ed9 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeFunkName.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeFunkName.yml @@ -7,13 +7,19 @@ command: modifier: {type: containingScope, scopeType: functionName} extraArgs: [] initialState: - documentContents: "int f(int a, int b) {\n \n}" + documentContents: |- + int f(int a, int b) { + + } selections: - anchor: {line: 1, character: 4} active: {line: 1, character: 4} marks: {} finalState: - documentContents: "int f(int a, int b) {\n \n}" + documentContents: |- + int f(int a, int b) { + + } selections: - anchor: {line: 0, character: 4} active: {line: 0, character: 5} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeFunkName2.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeFunkName2.yml index f8e8c011a8..f2327971d2 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeFunkName2.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeFunkName2.yml @@ -7,13 +7,19 @@ command: modifier: {type: containingScope, scopeType: functionName} extraArgs: [] initialState: - documentContents: "int C::f(int a, int b) {\n \n}" + documentContents: |- + int C::f(int a, int b) { + + } selections: - anchor: {line: 1, character: 4} active: {line: 1, character: 4} marks: {} finalState: - documentContents: "int C::f(int a, int b) {\n \n}" + documentContents: |- + int C::f(int a, int b) { + + } selections: - anchor: {line: 0, character: 7} active: {line: 0, character: 8} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeIf.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeIf.yml index 45da142d9f..84ffbf7780 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeIf.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeIf.yml @@ -7,13 +7,23 @@ command: modifier: {type: containingScope, scopeType: ifStatement} extraArgs: [] initialState: - documentContents: "void f() {\n if (true) {\n \n }\n}" + documentContents: |- + void f() { + if (true) { + + } + } selections: - anchor: {line: 2, character: 8} active: {line: 2, character: 8} marks: {} finalState: - documentContents: "void f() {\n if (true) {\n \n }\n}" + documentContents: |- + void f() { + if (true) { + + } + } selections: - anchor: {line: 1, character: 4} active: {line: 3, character: 5} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeIf2.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeIf2.yml index 95e20f7851..a90cd67dad 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeIf2.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeIf2.yml @@ -7,13 +7,23 @@ command: modifier: {type: containingScope, scopeType: ifStatement} extraArgs: [] initialState: - documentContents: "void f() {\n if constexpr (true) {\n \n }\n}" + documentContents: |- + void f() { + if constexpr (true) { + + } + } selections: - anchor: {line: 2, character: 8} active: {line: 2, character: 8} marks: {} finalState: - documentContents: "void f() {\n if constexpr (true) {\n \n }\n}" + documentContents: |- + void f() { + if constexpr (true) { + + } + } selections: - anchor: {line: 1, character: 4} active: {line: 3, character: 5} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeItem.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeItem.yml index ff3b8cc82e..5a1a892125 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeItem.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeItem.yml @@ -7,13 +7,25 @@ command: modifier: {type: containingScope, scopeType: collectionItem} extraArgs: [] initialState: - documentContents: "void f() {\n std::vector v {\n 1 + 2,\n 3\n };\n}" + documentContents: |- + void f() { + std::vector v { + 1 + 2, + 3 + }; + } selections: - anchor: {line: 2, character: 10} active: {line: 2, character: 10} marks: {} finalState: - documentContents: "void f() {\n std::vector v {\n 1 + 2,\n 3\n };\n}" + documentContents: |- + void f() { + std::vector v { + 1 + 2, + 3 + }; + } selections: - anchor: {line: 2, character: 8} active: {line: 2, character: 13} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeItem2.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeItem2.yml index 63863b812c..212cf9c90a 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeItem2.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeItem2.yml @@ -7,13 +7,25 @@ command: modifier: {type: containingScope, scopeType: collectionItem} extraArgs: [] initialState: - documentContents: "void f() {\n int arr[] = {\n 1 + 2,\n 3\n };\n}" + documentContents: |- + void f() { + int arr[] = { + 1 + 2, + 3 + }; + } selections: - anchor: {line: 2, character: 11} active: {line: 2, character: 11} marks: {} finalState: - documentContents: "void f() {\n int arr[] = {\n 1 + 2,\n 3\n };\n}" + documentContents: |- + void f() { + int arr[] = { + 1 + 2, + 3 + }; + } selections: - anchor: {line: 2, character: 8} active: {line: 2, character: 13} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeLambda.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeLambda.yml index f5c6cdd4b3..41beb7a690 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeLambda.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeLambda.yml @@ -7,13 +7,19 @@ command: modifier: {type: containingScope, scopeType: anonymousFunction} extraArgs: [] initialState: - documentContents: "void f() {\n [](){}();\n}\n" + documentContents: | + void f() { + [](){}(); + } selections: - anchor: {line: 1, character: 7} active: {line: 1, character: 7} marks: {} finalState: - documentContents: "void f() {\n [](){}();\n}\n" + documentContents: | + void f() { + [](){}(); + } selections: - anchor: {line: 1, character: 4} active: {line: 1, character: 10} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeList.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeList.yml index 03ad216fd1..db9cdf6164 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeList.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeList.yml @@ -7,13 +7,25 @@ command: modifier: {type: containingScope, scopeType: list} extraArgs: [] initialState: - documentContents: "void f() {\n std::vector v {\n 1 + 2,\n 3\n };\n}" + documentContents: |- + void f() { + std::vector v { + 1 + 2, + 3 + }; + } selections: - anchor: {line: 2, character: 11} active: {line: 2, character: 11} marks: {} finalState: - documentContents: "void f() {\n std::vector v {\n 1 + 2,\n 3\n };\n}" + documentContents: |- + void f() { + std::vector v { + 1 + 2, + 3 + }; + } selections: - anchor: {line: 1, character: 23} active: {line: 4, character: 5} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeList2.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeList2.yml index 41368d8b64..b8eb8f047d 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeList2.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeList2.yml @@ -7,13 +7,25 @@ command: modifier: {type: containingScope, scopeType: list} extraArgs: [] initialState: - documentContents: "void f() {\n int arr[] = {\n 1 + 2,\n 3\n };\n}" + documentContents: |- + void f() { + int arr[] = { + 1 + 2, + 3 + }; + } selections: - anchor: {line: 2, character: 12} active: {line: 2, character: 12} marks: {} finalState: - documentContents: "void f() {\n int arr[] = {\n 1 + 2,\n 3\n };\n}" + documentContents: |- + void f() { + int arr[] = { + 1 + 2, + 3 + }; + } selections: - anchor: {line: 1, character: 16} active: {line: 4, character: 5} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeName.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeName.yml index 385f69464d..d8f9c016be 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeName.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeName.yml @@ -7,13 +7,19 @@ command: modifier: {type: containingScope, scopeType: name} extraArgs: [] initialState: - documentContents: "void f() {\n int i = 1;\n}" + documentContents: |- + void f() { + int i = 1; + } selections: - anchor: {line: 1, character: 13} active: {line: 1, character: 13} marks: {} finalState: - documentContents: "void f() {\n int i = 1;\n}" + documentContents: |- + void f() { + int i = 1; + } selections: - anchor: {line: 1, character: 8} active: {line: 1, character: 9} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeName2.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeName2.yml index 005228023b..a68c008027 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeName2.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeName2.yml @@ -7,13 +7,19 @@ command: modifier: {type: containingScope, scopeType: name} extraArgs: [] initialState: - documentContents: "void f(int i = 1) {\n \n}" + documentContents: |- + void f(int i = 1) { + + } selections: - anchor: {line: 0, character: 15} active: {line: 0, character: 15} marks: {} finalState: - documentContents: "void f(int i = 1) {\n \n}" + documentContents: |- + void f(int i = 1) { + + } selections: - anchor: {line: 0, character: 11} active: {line: 0, character: 12} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeName3.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeName3.yml index 4414d7bb15..627e1d603c 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeName3.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeName3.yml @@ -7,13 +7,19 @@ command: modifier: {type: containingScope, scopeType: name} extraArgs: [] initialState: - documentContents: "void f(int i = 1) {\n \n}" + documentContents: |- + void f(int i = 1) { + + } selections: - anchor: {line: 1, character: 4} active: {line: 1, character: 4} marks: {} finalState: - documentContents: "void f(int i = 1) {\n \n}" + documentContents: |- + void f(int i = 1) { + + } selections: - anchor: {line: 0, character: 5} active: {line: 0, character: 6} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeState.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeState.yml index f389d0fed8..2bcb3254bf 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeState.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeState.yml @@ -7,13 +7,23 @@ command: modifier: {type: containingScope, scopeType: statement} extraArgs: [] initialState: - documentContents: "void f() {\n while (true) {\n ;\n }\n}" + documentContents: |- + void f() { + while (true) { + ; + } + } selections: - anchor: {line: 1, character: 7} active: {line: 1, character: 7} marks: {} finalState: - documentContents: "void f() {\n while (true) {\n ;\n }\n}" + documentContents: |- + void f() { + while (true) { + ; + } + } selections: - anchor: {line: 1, character: 4} active: {line: 3, character: 5} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeState2.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeState2.yml index bfc27e6824..9a90c967fa 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeState2.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeState2.yml @@ -7,13 +7,19 @@ command: modifier: {type: containingScope, scopeType: statement} extraArgs: [] initialState: - documentContents: "void f() {\n a = 1;\n}" + documentContents: |- + void f() { + a = 1; + } selections: - anchor: {line: 1, character: 7} active: {line: 1, character: 7} marks: {} finalState: - documentContents: "void f() {\n a = 1;\n}" + documentContents: |- + void f() { + a = 1; + } selections: - anchor: {line: 1, character: 4} active: {line: 1, character: 10} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeState3.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeState3.yml index eedff7a5b6..80108f8b52 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeState3.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeState3.yml @@ -7,13 +7,19 @@ command: modifier: {type: containingScope, scopeType: statement} extraArgs: [] initialState: - documentContents: "void f() {\n int a = 1;\n}" + documentContents: |- + void f() { + int a = 1; + } selections: - anchor: {line: 1, character: 10} active: {line: 1, character: 10} marks: {} finalState: - documentContents: "void f() {\n int a = 1;\n}" + documentContents: |- + void f() { + int a = 1; + } selections: - anchor: {line: 1, character: 4} active: {line: 1, character: 14} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeString.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeString.yml index 96b43849ea..b65f377445 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeString.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeString.yml @@ -7,13 +7,15 @@ command: modifier: {type: containingScope, scopeType: string} extraArgs: [] initialState: - documentContents: "char* a = \"hello world\";\n" + documentContents: | + char* a = "hello world"; selections: - anchor: {line: 0, character: 21} active: {line: 0, character: 21} marks: {} finalState: - documentContents: "char* a = \"hello world\";\n" + documentContents: | + char* a = "hello world"; selections: - anchor: {line: 0, character: 10} active: {line: 0, character: 23} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeType.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeType.yml index 565ab0b094..12995db166 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeType.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeType.yml @@ -7,13 +7,15 @@ command: modifier: {type: containingScope, scopeType: type} extraArgs: [] initialState: - documentContents: "int f(int a) {}\n" + documentContents: | + int f(int a) {} selections: - anchor: {line: 0, character: 10} active: {line: 0, character: 10} marks: {} finalState: - documentContents: "int f(int a) {}\n" + documentContents: | + int f(int a) {} selections: - anchor: {line: 0, character: 6} active: {line: 0, character: 9} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeType2.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeType2.yml index eb169585fc..b9b5891847 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeType2.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeType2.yml @@ -7,13 +7,15 @@ command: modifier: {type: containingScope, scopeType: type} extraArgs: [] initialState: - documentContents: "int f(int a) {}\n" + documentContents: | + int f(int a) {} selections: - anchor: {line: 0, character: 14} active: {line: 0, character: 14} marks: {} finalState: - documentContents: "int f(int a) {}\n" + documentContents: | + int f(int a) {} selections: - anchor: {line: 0, character: 0} active: {line: 0, character: 3} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeType3.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeType3.yml index a06291bf82..5a09b52d0a 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeType3.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeType3.yml @@ -7,13 +7,19 @@ command: modifier: {type: containingScope, scopeType: type} extraArgs: [] initialState: - documentContents: "int f(int a) {\n int j = a;\n}\n" + documentContents: | + int f(int a) { + int j = a; + } selections: - anchor: {line: 1, character: 13} active: {line: 1, character: 13} marks: {} finalState: - documentContents: "int f(int a) {\n int j = a;\n}\n" + documentContents: | + int f(int a) { + int j = a; + } selections: - anchor: {line: 1, character: 4} active: {line: 1, character: 7} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeValue.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeValue.yml index c312c33863..8e2ad63eca 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeValue.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeValue.yml @@ -7,13 +7,19 @@ command: modifier: {type: containingScope, scopeType: value} extraArgs: [] initialState: - documentContents: "int f(int a) {\n int j = a;\n}\n" + documentContents: | + int f(int a) { + int j = a; + } selections: - anchor: {line: 1, character: 5} active: {line: 1, character: 5} marks: {} finalState: - documentContents: "int f(int a) {\n int j = a;\n}\n" + documentContents: | + int f(int a) { + int j = a; + } selections: - anchor: {line: 1, character: 12} active: {line: 1, character: 13} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeValue2.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeValue2.yml index 4b7fd50570..e3f37d0553 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeValue2.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeValue2.yml @@ -7,13 +7,19 @@ command: modifier: {type: containingScope, scopeType: value} extraArgs: [] initialState: - documentContents: "int f(int a) {\n a = 2;\n}\n" + documentContents: | + int f(int a) { + a = 2; + } selections: - anchor: {line: 1, character: 5} active: {line: 1, character: 5} marks: {} finalState: - documentContents: "int f(int a) {\n a = 2;\n}\n" + documentContents: | + int f(int a) { + a = 2; + } selections: - anchor: {line: 1, character: 8} active: {line: 1, character: 9} diff --git a/src/test/suite/fixtures/recorded/languages/cpp/takeValue3.yml b/src/test/suite/fixtures/recorded/languages/cpp/takeValue3.yml index f74730af90..5dafc6716d 100644 --- a/src/test/suite/fixtures/recorded/languages/cpp/takeValue3.yml +++ b/src/test/suite/fixtures/recorded/languages/cpp/takeValue3.yml @@ -7,13 +7,17 @@ command: modifier: {type: containingScope, scopeType: value} extraArgs: [] initialState: - documentContents: "int f(int a = 1) {\n}\n" + documentContents: | + int f(int a = 1) { + } selections: - anchor: {line: 0, character: 11} active: {line: 0, character: 11} marks: {} finalState: - documentContents: "int f(int a = 1) {\n}\n" + documentContents: | + int f(int a = 1) { + } selections: - anchor: {line: 0, character: 14} active: {line: 0, character: 15} diff --git a/src/test/suite/fixtures/recorded/languages/java/takeItem.yml b/src/test/suite/fixtures/recorded/languages/java/takeItem.yml index 1534e5ec3e..2763cf7601 100644 --- a/src/test/suite/fixtures/recorded/languages/java/takeItem.yml +++ b/src/test/suite/fixtures/recorded/languages/java/takeItem.yml @@ -7,13 +7,17 @@ command: modifier: {type: containingScope, scopeType: collectionItem} extraArgs: [] initialState: - documentContents: "\nint[] values = {1, 2, 3};\n" + documentContents: | + + int[] values = {1, 2, 3}; selections: - anchor: {line: 1, character: 16} active: {line: 1, character: 16} marks: {} finalState: - documentContents: "\nint[] values = {1, 2, 3};\n" + documentContents: | + + int[] values = {1, 2, 3}; selections: - anchor: {line: 1, character: 16} active: {line: 1, character: 17} diff --git a/src/test/suite/fixtures/recorded/languages/json/takeItem.yml b/src/test/suite/fixtures/recorded/languages/json/takeItem.yml index bd2c6b669a..b1f4c193e3 100644 --- a/src/test/suite/fixtures/recorded/languages/json/takeItem.yml +++ b/src/test/suite/fixtures/recorded/languages/json/takeItem.yml @@ -7,13 +7,21 @@ command: modifier: {type: containingScope, scopeType: collectionItem} extraArgs: [] initialState: - documentContents: "\n{\n \"foo\": \"bar\"\n}\n" + documentContents: | + + { + "foo": "bar" + } selections: - anchor: {line: 2, character: 9} active: {line: 2, character: 9} marks: {} finalState: - documentContents: "\n{\n \"foo\": \"bar\"\n}\n" + documentContents: | + + { + "foo": "bar" + } selections: - anchor: {line: 2, character: 4} active: {line: 2, character: 16} diff --git a/src/test/suite/fixtures/recorded/languages/json/takeItem2.yml b/src/test/suite/fixtures/recorded/languages/json/takeItem2.yml index df8bb64c0a..e596c35431 100644 --- a/src/test/suite/fixtures/recorded/languages/json/takeItem2.yml +++ b/src/test/suite/fixtures/recorded/languages/json/takeItem2.yml @@ -7,13 +7,21 @@ command: modifier: {type: containingScope, scopeType: collectionItem} extraArgs: [] initialState: - documentContents: "\n{\n \"foo\": [1, 2, 3]\n}\n" + documentContents: | + + { + "foo": [1, 2, 3] + } selections: - anchor: {line: 2, character: 13} active: {line: 2, character: 13} marks: {} finalState: - documentContents: "\n{\n \"foo\": [1, 2, 3]\n}\n" + documentContents: | + + { + "foo": [1, 2, 3] + } selections: - anchor: {line: 2, character: 12} active: {line: 2, character: 13} diff --git a/src/test/suite/fixtures/recorded/languages/json/takeKey.yml b/src/test/suite/fixtures/recorded/languages/json/takeKey.yml index 2ac271ec68..e1f7d706e9 100644 --- a/src/test/suite/fixtures/recorded/languages/json/takeKey.yml +++ b/src/test/suite/fixtures/recorded/languages/json/takeKey.yml @@ -7,13 +7,21 @@ command: modifier: {type: containingScope, scopeType: collectionKey} extraArgs: [] initialState: - documentContents: "\n{\n \"foo\": \"bar\"\n}\n" + documentContents: | + + { + "foo": "bar" + } selections: - anchor: {line: 2, character: 10} active: {line: 2, character: 10} marks: {} finalState: - documentContents: "\n{\n \"foo\": \"bar\"\n}\n" + documentContents: | + + { + "foo": "bar" + } selections: - anchor: {line: 2, character: 4} active: {line: 2, character: 9} diff --git a/src/test/suite/fixtures/recorded/languages/json/takeList.yml b/src/test/suite/fixtures/recorded/languages/json/takeList.yml index 1738a9f249..d52adb14f1 100644 --- a/src/test/suite/fixtures/recorded/languages/json/takeList.yml +++ b/src/test/suite/fixtures/recorded/languages/json/takeList.yml @@ -7,13 +7,21 @@ command: modifier: {type: containingScope, scopeType: list} extraArgs: [] initialState: - documentContents: "\n{\n \"foo\": [1, 2, 3]\n}\n" + documentContents: | + + { + "foo": [1, 2, 3] + } selections: - anchor: {line: 2, character: 19} active: {line: 2, character: 19} marks: {} finalState: - documentContents: "\n{\n \"foo\": [1, 2, 3]\n}\n" + documentContents: | + + { + "foo": [1, 2, 3] + } selections: - anchor: {line: 2, character: 11} active: {line: 2, character: 20} diff --git a/src/test/suite/fixtures/recorded/languages/json/takeString.yml b/src/test/suite/fixtures/recorded/languages/json/takeString.yml index 29631499b7..8ad0f1ebb1 100644 --- a/src/test/suite/fixtures/recorded/languages/json/takeString.yml +++ b/src/test/suite/fixtures/recorded/languages/json/takeString.yml @@ -7,13 +7,21 @@ command: modifier: {type: containingScope, scopeType: string} extraArgs: [] initialState: - documentContents: "\n{\n \"foo\": \"bar\"\n}\n" + documentContents: | + + { + "foo": "bar" + } selections: - anchor: {line: 2, character: 12} active: {line: 2, character: 12} marks: {} finalState: - documentContents: "\n{\n \"foo\": \"bar\"\n}\n" + documentContents: | + + { + "foo": "bar" + } selections: - anchor: {line: 2, character: 11} active: {line: 2, character: 16} diff --git a/src/test/suite/fixtures/recorded/languages/json/takeValue.yml b/src/test/suite/fixtures/recorded/languages/json/takeValue.yml index 3c4f09ce7d..2d097f6b5c 100644 --- a/src/test/suite/fixtures/recorded/languages/json/takeValue.yml +++ b/src/test/suite/fixtures/recorded/languages/json/takeValue.yml @@ -7,13 +7,21 @@ command: modifier: {type: containingScope, scopeType: value} extraArgs: [] initialState: - documentContents: "\n{\n \"foo\": \"bar\"\n}\n" + documentContents: | + + { + "foo": "bar" + } selections: - anchor: {line: 2, character: 9} active: {line: 2, character: 9} marks: {} finalState: - documentContents: "\n{\n \"foo\": \"bar\"\n}\n" + documentContents: | + + { + "foo": "bar" + } selections: - anchor: {line: 2, character: 11} active: {line: 2, character: 16} diff --git a/src/test/suite/fixtures/recorded/marks/takeDownOne.yml b/src/test/suite/fixtures/recorded/marks/takeDownOne.yml index 39a010952c..57e1860d44 100644 --- a/src/test/suite/fixtures/recorded/marks/takeDownOne.yml +++ b/src/test/suite/fixtures/recorded/marks/takeDownOne.yml @@ -7,8 +7,8 @@ command: selectionType: line mark: type: lineNumber - anchor: {lineNumber: 1, type: "relative"} - active: {lineNumber: 1, type: "relative"} + anchor: {lineNumber: 1, type: relative} + active: {lineNumber: 1, type: relative} extraArgs: [] initialState: documentContents: | @@ -32,4 +32,4 @@ finalState: thatMark: - anchor: {line: 1, character: 0} active: {line: 1, character: 28} -fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: line, position: contents, modifier: {type: lineNumber, anchor: {lineNumber: 1, type: "relative"}, active: {lineNumber: 1, type: "relative"}}, insideOutsideType: inside}] +fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: line, position: contents, modifier: {type: lineNumber, anchor: {lineNumber: 1, type: relative}, active: {lineNumber: 1, type: relative}}, insideOutsideType: inside}] diff --git a/src/test/suite/fixtures/recorded/marks/takeDownOnePastThree.yml b/src/test/suite/fixtures/recorded/marks/takeDownOnePastThree.yml index dc650a18e0..da363afe6c 100644 --- a/src/test/suite/fixtures/recorded/marks/takeDownOnePastThree.yml +++ b/src/test/suite/fixtures/recorded/marks/takeDownOnePastThree.yml @@ -7,8 +7,8 @@ command: selectionType: line mark: type: lineNumber - anchor: {lineNumber: 1, type: "relative"} - active: {lineNumber: 3, type: "relative"} + anchor: {lineNumber: 1, type: relative} + active: {lineNumber: 3, type: relative} extraArgs: [] initialState: documentContents: | @@ -32,4 +32,4 @@ finalState: thatMark: - anchor: {line: 1, character: 0} active: {line: 3, character: 28} -fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: line, position: contents, modifier: {type: lineNumber, anchor: {lineNumber: 1, type: "relative"}, active: {lineNumber: 3, type: "relative"}}, insideOutsideType: inside}] +fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: line, position: contents, modifier: {type: lineNumber, anchor: {lineNumber: 1, type: relative}, active: {lineNumber: 3, type: relative}}, insideOutsideType: inside}] diff --git a/src/test/suite/fixtures/recorded/marks/takeRowFour.yml b/src/test/suite/fixtures/recorded/marks/takeRowFour.yml index 5fd8cbe2d9..91b6504147 100644 --- a/src/test/suite/fixtures/recorded/marks/takeRowFour.yml +++ b/src/test/suite/fixtures/recorded/marks/takeRowFour.yml @@ -7,8 +7,8 @@ command: selectionType: line mark: type: lineNumber - anchor: {lineNumber: 3, type: "absolute"} - active: {lineNumber: 3, type: "absolute"} + anchor: {lineNumber: 3, type: absolute} + active: {lineNumber: 3, type: absolute} extraArgs: [] initialState: documentContents: | @@ -32,4 +32,4 @@ finalState: thatMark: - anchor: {line: 3, character: 0} active: {line: 3, character: 28} -fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: line, position: contents, modifier: {type: lineNumber, anchor: {lineNumber: 3, type: "absolute"}, active: {lineNumber: 3, type: "absolute"}}, insideOutsideType: inside}] +fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: line, position: contents, modifier: {type: lineNumber, anchor: {lineNumber: 3, type: absolute}, active: {lineNumber: 3, type: absolute}}, insideOutsideType: inside}] diff --git a/src/test/suite/fixtures/recorded/marks/takeRowTwoPastDownThree.yml b/src/test/suite/fixtures/recorded/marks/takeRowTwoPastDownThree.yml index d793d2323b..134bc7216d 100644 --- a/src/test/suite/fixtures/recorded/marks/takeRowTwoPastDownThree.yml +++ b/src/test/suite/fixtures/recorded/marks/takeRowTwoPastDownThree.yml @@ -7,8 +7,8 @@ command: selectionType: line mark: type: lineNumber - anchor: {lineNumber: 1, type: "absolute"} - active: {lineNumber: 3, type: "relative"} + anchor: {lineNumber: 1, type: absolute} + active: {lineNumber: 3, type: relative} extraArgs: [] initialState: documentContents: | @@ -32,4 +32,4 @@ finalState: thatMark: - anchor: {line: 1, character: 0} active: {line: 3, character: 28} -fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: line, position: contents, modifier: {type: lineNumber, anchor: {lineNumber: 1, type: "absolute"}, active: {lineNumber: 3, type: "relative"}}, insideOutsideType: inside}] +fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: line, position: contents, modifier: {type: lineNumber, anchor: {lineNumber: 1, type: absolute}, active: {lineNumber: 3, type: relative}}, insideOutsideType: inside}] diff --git a/src/test/suite/fixtures/recorded/marks/takeRowTwoPastFour.yml b/src/test/suite/fixtures/recorded/marks/takeRowTwoPastFour.yml index 2f95f94afc..4c10227393 100644 --- a/src/test/suite/fixtures/recorded/marks/takeRowTwoPastFour.yml +++ b/src/test/suite/fixtures/recorded/marks/takeRowTwoPastFour.yml @@ -7,8 +7,8 @@ command: selectionType: line mark: type: lineNumber - anchor: {lineNumber: 1, type: "absolute"} - active: {lineNumber: 3, type: "absolute"} + anchor: {lineNumber: 1, type: absolute} + active: {lineNumber: 3, type: absolute} extraArgs: [] initialState: documentContents: | @@ -32,4 +32,4 @@ finalState: thatMark: - anchor: {line: 1, character: 0} active: {line: 3, character: 28} -fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: line, position: contents, modifier: {type: lineNumber, anchor: {lineNumber: 1, type: "absolute"}, active: {lineNumber: 3, type: "absolute"}}, insideOutsideType: inside}] +fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: line, position: contents, modifier: {type: lineNumber, anchor: {lineNumber: 1, type: absolute}, active: {lineNumber: 3, type: absolute}}, insideOutsideType: inside}] diff --git a/src/test/suite/fixtures/recorded/marks/takeUpOnePastDownOne.yml b/src/test/suite/fixtures/recorded/marks/takeUpOnePastDownOne.yml index 7a5337eec1..1b1598cf2b 100644 --- a/src/test/suite/fixtures/recorded/marks/takeUpOnePastDownOne.yml +++ b/src/test/suite/fixtures/recorded/marks/takeUpOnePastDownOne.yml @@ -7,8 +7,8 @@ command: selectionType: line mark: type: lineNumber - anchor: {lineNumber: -1, type: "relative"} - active: {lineNumber: 1, type: "relative"} + anchor: {lineNumber: -1, type: relative} + active: {lineNumber: 1, type: relative} extraArgs: [] initialState: documentContents: | @@ -32,4 +32,4 @@ finalState: thatMark: - anchor: {line: 1, character: 0} active: {line: 3, character: 28} -fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: line, position: contents, modifier: {type: lineNumber, anchor: {lineNumber: -1, type: "relative"}, active: {lineNumber: 1, type: "relative"}}, insideOutsideType: inside}] +fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: line, position: contents, modifier: {type: lineNumber, anchor: {lineNumber: -1, type: relative}, active: {lineNumber: 1, type: relative}}, insideOutsideType: inside}] diff --git a/src/test/suite/fixtures/recorded/marks/takeUpOnePastRowFour.yml b/src/test/suite/fixtures/recorded/marks/takeUpOnePastRowFour.yml index 505c0b37e1..69b0e7e2e5 100644 --- a/src/test/suite/fixtures/recorded/marks/takeUpOnePastRowFour.yml +++ b/src/test/suite/fixtures/recorded/marks/takeUpOnePastRowFour.yml @@ -7,8 +7,8 @@ command: selectionType: line mark: type: lineNumber - anchor: {lineNumber: -1, type: "relative"} - active: {lineNumber: 3, type: "absolute"} + anchor: {lineNumber: -1, type: relative} + active: {lineNumber: 3, type: absolute} extraArgs: [] initialState: documentContents: | @@ -32,4 +32,4 @@ finalState: thatMark: - anchor: {line: 1, character: 0} active: {line: 3, character: 28} -fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: line, position: contents, modifier: {type: lineNumber, anchor: {lineNumber: -1, type: "relative"}, active: {lineNumber: 3, type: "absolute"}}, insideOutsideType: inside}] +fullTargets: [{type: primitive, mark: {type: cursor}, selectionType: line, position: contents, modifier: {type: lineNumber, anchor: {lineNumber: -1, type: relative}, active: {lineNumber: 3, type: absolute}}, insideOutsideType: inside}]