diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..9dba9dfba --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 046bdbd49..0e711b736 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -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 diff --git a/src/vscode-tree-item/vscode-tree-item.ts b/src/vscode-tree-item/vscode-tree-item.ts index e39c96123..e92937095 100644 --- a/src/vscode-tree-item/vscode-tree-item.ts +++ b/src/vscode-tree-item/vscode-tree-item.ts @@ -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) { @@ -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; } } diff --git a/src/vscode-tree/vscode-tree.test.ts b/src/vscode-tree/vscode-tree.test.ts index 16fe0eba2..25b8abdb2 100644 --- a/src/vscode-tree/vscode-tree.test.ts +++ b/src/vscode-tree/vscode-tree.test.ts @@ -623,11 +623,13 @@ describe('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($('#item1').selected).to.be.true; expect($('#item2').selected).to.be.false;