File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
packages/cursorless-engine/src/processTargets/targets Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 11import type { Range } from "@cursorless/common" ;
2+ import { shrinkRangeToFitContent } from "../../util/selectionUtils" ;
23import { BaseTarget , type CommonTargetParameters } from "./BaseTarget" ;
3- import { InteriorTarget } from "./InteriorTarget " ;
4+ import { PlainTarget } from "./PlainTarget " ;
45
56export class DocumentTarget extends BaseTarget < CommonTargetParameters > {
67 type = "DocumentTarget" ;
@@ -13,10 +14,11 @@ export class DocumentTarget extends BaseTarget<CommonTargetParameters> {
1314
1415 getInterior ( ) {
1516 return [
16- new InteriorTarget ( {
17+ // Use plain target instead of interior target since we want the same content and removal range for a document interior.
18+ new PlainTarget ( {
1719 editor : this . editor ,
1820 isReversed : this . isReversed ,
19- fullInteriorRange : this . contentRange ,
21+ contentRange : shrinkRangeToFitContent ( this . editor , this . contentRange ) ,
2022 } ) ,
2123 ] ;
2224 }
You can’t perform that action at this time.
0 commit comments