Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ben/next #26025

Merged
merged 5 commits into from
May 5, 2017
Merged

Ben/next #26025

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/typings/chokidar.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ declare module 'chokidar' {
* (default: true). When false, only the symlinks themselves will be watched for changes instead of following the link references and bubbling events through the link's path.
*/
followSymlinks?: boolean;

/**
* (default: false). If set to true then the strings passed to .watch() and .add() are treated as literal path names, even if they look like globs.
*/
disableGlobbing?: boolean;
}

export interface FSWatcher {
Expand Down
7 changes: 2 additions & 5 deletions src/vs/code/electron-main/windows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,8 @@ export class WindowsManager implements IWindowsMainService {
this.lifecycleService.onBeforeWindowClose(win => this.onBeforeWindowClose(win));
this.lifecycleService.onBeforeQuit(() => this.onBeforeQuit());

KeyboardLayoutMonitor.INSTANCE.onDidChangeKeyboardLayout((isISOKeyboard: boolean) => {
WindowsManager.WINDOWS.forEach((window) => {
window.sendWhenReady('vscode:keyboardLayoutChanged', isISOKeyboard);
});
});
// Keyboard layout changes
KeyboardLayoutMonitor.INSTANCE.onDidChangeKeyboardLayout(isISOKeyboard => this.sendToAll('vscode:keyboardLayoutChanged', isISOKeyboard));
}

// Note that onBeforeQuit() and onBeforeWindowClose() are fired in different order depending on the OS:
Expand Down
10 changes: 8 additions & 2 deletions src/vs/workbench/browser/parts/editor/editorGroupsControl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1282,8 +1282,14 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro
// Drag enter
let counter = 0; // see https://github.com/Microsoft/vscode/issues/14470
this.toUnbind.push(DOM.addDisposableListener(node, DOM.EventType.DRAG_ENTER, (e: DragEvent) => {
if (!TitleControl.getDraggedEditor() && !extractResources(e).length) {
return; // invalid DND
if (!TitleControl.getDraggedEditor()) {
// we used to check for the dragged resources here (via dnd.extractResources()) but this
// seems to be not possible on Linux and Windows where during DRAG_ENTER the resources
// are always undefined up until they are dropped when dragged from the tree. The workaround
// is to check for a datatransfer type being set. See https://github.com/Microsoft/vscode/issues/25789
if (!e.dataTransfer.types.length) {
return; // invalid DND
}
}

counter++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -860,10 +860,11 @@ export class QuickOpenController extends Component implements IQuickOpenService

// Show additional handler results below any existing results
if (additionalHandlerResults.length > 0) {
const autoFocusFirstEntry = (quickOpenModel.getEntries().length === 0); // the user might have selected another entry meanwhile in local history (see https://github.com/Microsoft/vscode/issues/20828)
const useTopBorder = quickOpenModel.getEntries().length > 0;
additionalHandlerResults[0] = new QuickOpenEntryGroup(additionalHandlerResults[0], groupLabel, useTopBorder);
quickOpenModel.addEntries(additionalHandlerResults);
this.quickOpenWidget.refresh(quickOpenModel, { autoFocusFirstEntry: true });
this.quickOpenWidget.refresh(quickOpenModel, { autoFocusFirstEntry });
}

// Otherwise if no results are present (even from histoy) indicate this to the user
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/parts/files/browser/files.contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ configurationRegistry.registerConfiguration({
},
'files.watcherExclude': {
'type': 'object',
'default': { '**/.git/objects/**': true, '**/node_modules/**': true },
'default': platform.isWindows /* https://github.com/Microsoft/vscode/issues/23954 */ ? { '**/.git/objects/**': true, '**/node_modules/*/**': true } : { '**/.git/objects/**': true, '**/node_modules/**': true },
'description': nls.localize('watcherExclude', "Configure glob patterns of file paths to exclude from file watching. Changing this setting requires a restart. When you experience Code consuming lots of cpu time on startup, you can exclude large folders to reduce the initial load.")
},
'files.hotExit': {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ export class ChokidarWatcherService implements IWatcherService {
followSymlinks: true, // this is the default of chokidar and supports file events through symlinks
ignored: request.ignored,
interval: 1000, // while not used in normal cases, if any error causes chokidar to fallback to polling, increase its intervals
binaryInterval: 1000
binaryInterval: 1000,
disableGlobbing: true // fix https://github.com/Microsoft/vscode/issues/4586
};

// Chokidar fails when the basePath does not match case-identical to the path on disk
Expand Down