-
-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Support UTF-16 words lists (#2549)
- Loading branch information
Showing
8 changed files
with
73 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { Range, TextDocument, TextEdit, workspace, WorkspaceEdit } from 'vscode'; | ||
|
||
export async function replaceDocText(doc: TextDocument, text: string): Promise<boolean> { | ||
const wsEdit = new WorkspaceEdit(); | ||
const range = new Range(doc.positionAt(0), doc.positionAt(doc.getText().length)); | ||
const teReplaceDoc = TextEdit.replace(range, text); | ||
wsEdit.set(doc.uri, [teReplaceDoc]); | ||
const success = await workspace.applyEdit(wsEdit); | ||
success && (await doc.save()); | ||
return success; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Test UTF16 word lists. | ||
|
||
mywordd | ||
otherword | ||
|
||
mywordbe | ||
|
||
mywordle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
dictionaryDefinitions: | ||
- name: words16le | ||
path: ./words16le.dic | ||
addWords: true | ||
- name: words16be | ||
path: ./words/words16be.dic | ||
addWords: true | ||
dictionaries: | ||
- words16be | ||
- words16le |
Binary file not shown.
Binary file not shown.