Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Auto detect text files and enforce LF line endings
* text=auto eol=lf

# Source code
*.js text eol=lf
*.mjs text eol=lf
*.ts text eol=lf
*.json text eol=lf
*.html text eol=lf
*.css text eol=lf

# Documentation
*.md text eol=lf

# Config files
*.yml text eol=lf
*.yaml text eol=lf
*.config text eol=lf
*.lock text eol=lf
.gitattributes text eol=lf
.gitignore text eol=lf
.editorconfig text eol=lf
.ncurc text eol=lf
.mailmap text eol=lf

# Graphics
*.svg text eol=lf
*.woff binary
*.woff2 binary
*.ttf binary
*.eot binary
*.ico binary
7 changes: 6 additions & 1 deletion .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ on: pull_request

jobs:
verify:
runs-on: ubuntu-latest
name: Verify (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
steps:
- name: Clone Repository
uses: actions/checkout@v5
Expand Down
7 changes: 5 additions & 2 deletions src/vscode-tree-item/vscode-tree-item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ export class VscodeTreeItem extends VscElement {
private _handleContentClick(ev: MouseEvent) {
ev.stopPropagation();

const isCtrlDown = ev.ctrlKey;
const isCtrlDown = ev.ctrlKey || ev.metaKey;
const isShiftDown = ev.shiftKey;

if (isShiftDown && this._configContext.multiSelect) {
Expand Down Expand Up @@ -356,7 +356,10 @@ export class VscodeTreeItem extends VscElement {

private _handleDoubleClick(ev: MouseEvent) {
if (this._configContext.expandMode === ExpandMode.doubleClick) {
if (this.branch && !(this._configContext.multiSelect && ev.ctrlKey)) {
if (
this.branch &&
!(this._configContext.multiSelect && (ev.ctrlKey || ev.metaKey))
) {
this.open = !this.open;
}
}
Expand Down
6 changes: 4 additions & 2 deletions src/vscode-tree/vscode-tree.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -623,11 +623,13 @@ describe('vscode-tree', () => {
</vscode-tree>`
);

const isMac = window.navigator.userAgent.includes('Mac');
const downKey = isMac ? 'Meta' : 'Control';
await clickOnElement($('#item1'));
await sendKeys({down: 'Control'});
await sendKeys({down: downKey});
await clickOnElement($('#item3'));
await clickOnElement($('#item5'));
await sendKeys({up: 'Control'});
await sendKeys({up: downKey});

expect($<VscodeTreeItem>('#item1').selected).to.be.true;
expect($<VscodeTreeItem>('#item2').selected).to.be.false;
Expand Down
Loading