File tree Expand file tree Collapse file tree 3 files changed +3
-16
lines changed
packages/cursorless-engine/src Expand file tree Collapse file tree 3 files changed +3
-16
lines changed Original file line number Diff line number Diff line change 1
1
import { Disposable } from "@cursorless/common" ;
2
2
import { Debouncer } from "./core/Debouncer" ;
3
3
import { StoredTargetMap } from "./core/StoredTargets" ;
4
- import { PlainTarget } from "./processTargets/targets " ;
4
+ import { CursorStage } from "./processTargets/marks/CursorStage " ;
5
5
import { ide } from "./singletons/ide.singleton" ;
6
6
7
7
export class KeyboardTargetUpdater {
@@ -49,17 +49,7 @@ export class KeyboardTargetUpdater {
49
49
return ;
50
50
}
51
51
52
- this . storedTargets . set (
53
- "keyboard" ,
54
- activeEditor . selections . map (
55
- ( selection ) =>
56
- new PlainTarget ( {
57
- contentRange : selection ,
58
- editor : activeEditor ,
59
- isReversed : selection . isReversed ,
60
- } ) ,
61
- ) ,
62
- ) ;
52
+ this . storedTargets . set ( "keyboard" , new CursorStage ( ) . run ( ) ) ;
63
53
}
64
54
65
55
dispose ( ) {
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ export class MarkStageFactoryImpl implements MarkStageFactory {
30
30
create ( mark : Mark ) : MarkStage {
31
31
switch ( mark . type ) {
32
32
case "cursor" :
33
- return new CursorStage ( mark ) ;
33
+ return new CursorStage ( ) ;
34
34
case "that" :
35
35
case "source" :
36
36
case "keyboard" :
Original file line number Diff line number Diff line change 1
- import type { CursorMark } from "@cursorless/common" ;
2
1
import { ide } from "../../singletons/ide.singleton" ;
3
2
import type { Target } from "../../typings/target.types" ;
4
3
import type { MarkStage } from "../PipelineStages.types" ;
5
4
import { UntypedTarget } from "../targets" ;
6
5
import { getActiveSelections } from "./getActiveSelections" ;
7
6
8
7
export class CursorStage implements MarkStage {
9
- constructor ( private mark : CursorMark ) { }
10
-
11
8
run ( ) : Target [ ] {
12
9
return getActiveSelections ( ide ( ) ) . map (
13
10
( selection ) =>
You can’t perform that action at this time.
0 commit comments