(getReplacement: GetReplacementFn, forcedType?: CursorType)
| 189 | }; |
| 190 | |
| 191 | private getResult(getReplacement: GetReplacementFn, forcedType?: CursorType) { |
| 192 | const type = forcedType ?? getCursorType(this.textarea); |
| 193 | |
| 194 | if (type === CursorType.Isolated) { |
| 195 | return this.getIsolatedReplacement(getReplacement); |
| 196 | } |
| 197 | |
| 198 | if (type === CursorType.Highlighted) { |
| 199 | return this.getHighlightedReplacement(getReplacement); |
| 200 | } |
| 201 | |
| 202 | return this.getAdjacentReplacement(getReplacement); |
| 203 | } |
| 204 | |
| 205 | async replaceWord( |
| 206 | getReplacement: GetReplacementFn, |
no test coverage detected