MCPcopy
hub / github.com/VSCodeVim/Vim / isPanelVisible

Function isPanelVisible

test/cmd_line/only.test.ts:9–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7import { cleanUpWorkspace, setupWorkspace, waitForEditorsToClose } from '../testUtils';
8
9const isPanelVisible = async () =>
10 withinIsolatedEditor(async () => {
11 // Insert 1000 lines (ie. beyond veritical viewport)
12 await vscode.window.activeTextEditor!.edit((editBuilder) => {
13 editBuilder.insert(new vscode.Position(0, 0), 'Line\n'.repeat(1000));
14 });
15
16 // Toggle the panel's visibility to see which has a larger vertical viewport
17 const initialVisibleLineCount = await getNumberOfVisibleLines();
18 await vscode.commands.executeCommand('workbench.action.togglePanel');
19 const postToggleVisibleLineCount = await getNumberOfVisibleLines();
20 await vscode.commands.executeCommand('workbench.action.togglePanel');
21
22 return postToggleVisibleLineCount > initialVisibleLineCount;
23 });
24
25const withinIsolatedEditor = async (lambda: () => Thenable<unknown>) => {
26 await vscode.commands.executeCommand('workbench.action.files.newUntitledFile');

Callers 1

only.test.tsFile · 0.85

Calls 4

withinIsolatedEditorFunction · 0.85
getNumberOfVisibleLinesFunction · 0.85
editMethod · 0.80
insertMethod · 0.45

Tested by

no test coverage detected