File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
packages/cursorless-engine/src/typings Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,19 @@ export interface Target {
136136 /** The range of the delimiter after the content selection */
137137 getTrailingDelimiterTarget ( ) : Target | undefined ;
138138 getRemovalRange ( ) : Range ;
139+
140+ /**
141+ * The range that should be highlighted when the target is removed. Note that
142+ * we can't just use `getRemovalRange()`, because when we highlight a line for
143+ * removal, we don't know which line to highlight just based on the removal
144+ * range.
145+ *
146+ * For example, assume that the document, represented as a string, is `"\n"`.
147+ * This corresponds to a document with two empty lines. If we say `"chuck
148+ * line"` on either line, the removal range will be the entire document, but
149+ * we want to highlight the line that they were on when they said `"chuck
150+ * line"`, as that is logically the line they've deleted.
151+ */
139152 getRemovalHighlightRange ( ) : Range ;
140153 withThatTarget ( thatTarget : Target ) : Target ;
141154 withContentRange ( contentRange : Range ) : Target ;
You can’t perform that action at this time.
0 commit comments