Upstream vscode-neovim/vscode-neovim state of the touched files before 594cab76b1
This commit is contained in:
1 parent
b87849804c
commit
aacc554f30
2 files changed
+11
-66
No files matched your search
@@ -1,5 +1,4 @@
|
||||
import { NeovimClient } from "neovim";
|
||||
import vscode from "vscode";
|
||||
|
||||
import {
|
||||
attachTestNvimClient,
|
||||
@@ -287,54 +286,4 @@ describe("Multi-width characters", () => {
|
||||
client,
|
||||
);
|
||||
});
|
||||
|
||||
it("Works - visual mode over chars outside the BMP", async () => {
|
||||
// 𝕜 is U+1D55C: one Nvim character, but two UTF-16 units for VSCode
|
||||
await openTextDocument({ content: ["a𝕜b"].join("\n") });
|
||||
|
||||
await assertContent({ content: ["a𝕜b"], cursor: [0, 0] }, client);
|
||||
|
||||
await sendVSCodeKeys("v");
|
||||
await assertContent({ vsCodeSelections: [new vscode.Selection(0, 0, 0, 1)] }, client);
|
||||
|
||||
await sendVSCodeKeys("l");
|
||||
await assertContent({ vsCodeSelections: [new vscode.Selection(0, 0, 0, 3)] }, client);
|
||||
|
||||
await sendVSCodeKeys("l");
|
||||
await assertContent({ vsCodeSelections: [new vscode.Selection(0, 0, 0, 4)] }, client);
|
||||
|
||||
await sendEscapeKey();
|
||||
});
|
||||
|
||||
it("Works - visual mode over consecutive non-BMP chars", async () => {
|
||||
await openTextDocument({ content: ["a𝕜𝕝b"].join("\n") });
|
||||
|
||||
await sendVSCodeKeys("v");
|
||||
await assertContent({ vsCodeSelections: [new vscode.Selection(0, 0, 0, 1)] }, client);
|
||||
|
||||
await sendVSCodeKeys("ll");
|
||||
await assertContent({ vsCodeSelections: [new vscode.Selection(0, 0, 0, 5)] }, client);
|
||||
|
||||
await sendVSCodeKeys("l");
|
||||
await assertContent({ vsCodeSelections: [new vscode.Selection(0, 0, 0, 6)] }, client);
|
||||
|
||||
await sendEscapeKey();
|
||||
});
|
||||
|
||||
it("Works - visual mode across mixed BMP and non-BMP chars", async () => {
|
||||
await openTextDocument({ content: ["aᵩ𝕜b"].join("\n") });
|
||||
|
||||
await sendVSCodeKeys("v");
|
||||
await assertContent({ vsCodeSelections: [new vscode.Selection(0, 0, 0, 1)] }, client);
|
||||
|
||||
// the cursor sits on the astral char, whose two UTF-16 units both belong to
|
||||
// the selection: a, the modifier letter and the pair take offsets 0 to 4
|
||||
await sendVSCodeKeys("ll");
|
||||
await assertContent({ vsCodeSelections: [new vscode.Selection(0, 0, 0, 4)] }, client);
|
||||
|
||||
await sendVSCodeKeys("l");
|
||||
await assertContent({ vsCodeSelections: [new vscode.Selection(0, 0, 0, 5)] }, client);
|
||||
|
||||
await sendEscapeKey();
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user