提交 00bce12e 编写于 作者: B Benjamin Pasero

Merge branch 'master' into ben/debt

......@@ -318,9 +318,6 @@
{
"include": "#preprocessor-rule-other-block"
},
{
"include": "#sizeof"
},
{
"include": "#access"
},
......@@ -458,7 +455,7 @@
"line_continuation_character": {
"patterns": [
{
"match": "(\\\\)\\s*\\n",
"match": "(\\\\)\\n",
"captures": {
"1": {
"name": "constant.character.escape.line-continuation.c"
......@@ -891,6 +888,15 @@
}
},
"patterns": [
{
"include": "#access"
},
{
"include": "#libc"
},
{
"include": "#c_function_call"
},
{
"include": "$self"
}
......@@ -976,5 +982,5 @@
]
}
},
"version": "https://github.com/atom/language-c/commit/2a5fafe1d86f690b5ab2c877cea2fc6a598e001a"
"version": "https://github.com/atom/language-c/commit/0d0f32388e73fc91a86f4c31ff59c36191869d63"
}
\ No newline at end of file
......@@ -180,31 +180,23 @@ export function getIconClasses(modelService: IModelService, modeService: IModeSe
}
if (path) {
const basename = paths.basename(path);
const dotSegments = basename.split('.');
const basename = cssEscape(paths.basename(path).toLowerCase());
// Folders
if (isFolder) {
if (basename) {
classes.push(`${basename.toLowerCase()}-name-folder-icon`);
}
classes.push(`${basename}-name-folder-icon`);
}
// Files
else {
// Name
const name = dotSegments[0]; // file.txt => "file", .dockerfile => "", file.some.txt => "file"
if (name) {
classes.push(`${cssEscape(name.toLowerCase())}-name-file-icon`);
}
classes.push(`${basename}-name-file-icon`);
// Extension(s)
const extensions = dotSegments.splice(1);
if (extensions.length > 0) {
for (let i = 0; i < extensions.length; i++) {
classes.push(`${cssEscape(extensions.slice(i).join('.').toLowerCase())}-ext-file-icon`); // add each combination of all found extensions if more than one
}
const dotSegments = basename.split('.');
for (let i = 1; i < dotSegments.length; i++) {
classes.push(`${dotSegments.slice(i).join('.')}-ext-file-icon`); // add each combination of all found extensions if more than one
}
// Configured Language
......@@ -215,7 +207,6 @@ export function getIconClasses(modelService: IModelService, modeService: IModeSe
}
}
}
return classes;
}
......
......@@ -210,7 +210,6 @@ function handleCommandDeprecations(): void {
'workbench.files.action.reopenClosedFile': 'workbench.action.reopenClosedEditor',
'workbench.files.action.workingFilesPicker': 'workbench.action.showAllEditors',
'workbench.action.cycleEditor': 'workbench.action.navigateEditorGroups',
'workbench.action.terminal.focus': 'workbench.action.focusPanel',
'workbench.action.showEditorsInLeftGroup': 'workbench.action.showEditorsInFirstGroup',
'workbench.action.showEditorsInCenterGroup': 'workbench.action.showEditorsInSecondGroup',
'workbench.action.showEditorsInRightGroup': 'workbench.action.showEditorsInThirdGroup',
......
......@@ -557,10 +557,9 @@ function _processIconThemeDocument(id: string, iconThemeDocumentPath: string, ic
if (fileNames) {
for (let fileName in fileNames) {
let selectors: string[] = [];
let segments = fileName.toLowerCase().split('.');
if (segments[0]) {
selectors.push(`.${escapeCSS(segments[0])}-name-file-icon`);
}
fileName = fileName.toLowerCase();
selectors.push(`.${escapeCSS(fileName)}-name-file-icon`);
let segments = fileName.split('.');
for (let i = 1; i < segments.length; i++) {
selectors.push(`.${escapeCSS(segments.slice(i).join('.'))}-ext-file-icon`);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册