Skip to content

Commit 3792d24

Browse files
authored
Merge pull request #27 from martinRenou/right_click_do_not_toggle_dir
Do not toggle directories on right-click
2 parents a8d47df + 31dcc19 commit 3792d24

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

src/unfold.ts

+1-6
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)