Skip to content

Commit 31dcc19

Browse files
committed
Do not toggle directories on right-click
1 parent a8d47df commit 31dcc19

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

src/unfold.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -348,12 +348,7 @@ export class DirTreeListing extends DirListing {
348348
if (entry.type === 'directory') {
349349
this.model.path = '/' + entry.path;
350350

351-
if (
352-
this._singleClickToUnfold &&
353-
(event.button === 0 || // State toggled on main button
354-
(event.button === 2 && !this.model.isOpen(entry.path)) || // State toggled on right click if folder is closed
355-
event.type === 'click') // State toggled on click and double click
356-
) {
351+
if (this._singleClickToUnfold && event.button === 0) {
357352
this.model.toggle(entry.path);
358353
}
359354
} else {
Loading

0 commit comments

Comments
 (0)