Skip to content

Commit 12e7687

Browse files
authored
Fix inside-outside for implicit targets (#398)
* Fix inside outside inference * Attempt to fix inside-outside for implicit target * Fixes * Revert "Fixes" This reverts commit 80a9ca1. * Another attempt at implicit fix * Add log fix back * Revert stuff
1 parent d0ec005 commit 12e7687

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

src/core/commandRunner/CommandRunner.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ export default class CommandRunner {
6666
action.getTargetPreferences(...extraArgs)
6767
);
6868

69+
if (this.graph.debug.active) {
70+
this.graph.debug.log("Full targets:");
71+
this.graph.debug.log(JSON.stringify(targets, null, 3));
72+
}
73+
6974
const processedTargetsContext: ProcessedTargetsContext = {
7075
currentSelections:
7176
vscode.window.activeTextEditor?.selections.map((selection) => ({

src/processTargets/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -270,17 +270,17 @@ function processPrimitiveTarget(
270270
const modifiedSelections = markSelections.flatMap((markSelection) =>
271271
processModifier(context, target, markSelection)
272272
);
273+
if (target.isImplicit) {
274+
modifiedSelections.forEach((typedSelection) => {
275+
typedSelection.context.isRawSelection = true;
276+
});
277+
}
278+
273279
const typedSelections = modifiedSelections.map(
274280
({ selection, context: selectionContext }) =>
275281
processSelectionType(context, target, selection, selectionContext)
276282
);
277283

278-
if (target.isImplicit) {
279-
typedSelections.forEach((typedSelection) => {
280-
typedSelection.selectionContext.isRawSelection = true;
281-
});
282-
}
283-
284284
return typedSelections.map((selection) =>
285285
processPosition(context, target, selection)
286286
);

0 commit comments

Comments
 (0)