Skip to content

Commit

Permalink
Revert "Merge pull request #15612 from rebornix/MarginHighlight"
Browse files Browse the repository at this point in the history
This reverts commit ddae048, reversing
changes made to e55b563.
  • Loading branch information
joaomoreno committed Nov 18, 2016
1 parent 672b147 commit ce97d43
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 165 deletions.
2 changes: 0 additions & 2 deletions src/vs/editor/browser/view/viewImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import { ContentViewOverlays, MarginViewOverlays } from 'vs/editor/browser/view/
import { LayoutProvider } from 'vs/editor/browser/viewLayout/layoutProvider';
import { ViewContentWidgets } from 'vs/editor/browser/viewParts/contentWidgets/contentWidgets';
import { CurrentLineHighlightOverlay } from 'vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight';
import { CurrentLineMarginHighlightOverlay } from 'vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight';
import { DecorationsOverlay } from 'vs/editor/browser/viewParts/decorations/decorations';
import { GlyphMarginOverlay } from 'vs/editor/browser/viewParts/glyphMargin/glyphMargin';
import { LineNumbersOverlay } from 'vs/editor/browser/viewParts/lineNumbers/lineNumbers';
Expand Down Expand Up @@ -239,7 +238,6 @@ export class View extends ViewEventHandler implements editorBrowser.IView, IDisp

let marginViewOverlays = new MarginViewOverlays(this._context, this.layoutProvider);
this.viewParts.push(marginViewOverlays);
marginViewOverlays.addDynamicOverlay(new CurrentLineMarginHighlightOverlay(this._context, this.layoutProvider));
marginViewOverlays.addDynamicOverlay(new GlyphMarginOverlay(this._context));
marginViewOverlays.addDynamicOverlay(new MarginViewLineDecorationsOverlay(this._context));
marginViewOverlays.addDynamicOverlay(new LinesDecorationsOverlay(this._context));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class CurrentLineHighlightOverlay extends DynamicViewOverlay {
private _context: ViewContext;
private _lineHeight: number;
private _readOnly: boolean;
private _renderLineHighlight: 'none' | 'gutter' | 'line' | 'all';
private _renderLineHighlight: boolean;
private _layoutProvider: ILayoutProvider;
private _selectionIsEmpty: boolean;
private _primaryCursorIsInEditableRange: boolean;
Expand Down Expand Up @@ -134,8 +134,6 @@ export class CurrentLineHighlightOverlay extends DynamicViewOverlay {
}

private _shouldShowCurrentLine(): boolean {
return (this._renderLineHighlight === 'line' || this._renderLineHighlight === 'all') &&
this._selectionIsEmpty &&
this._primaryCursorIsInEditableRange;
return this._renderLineHighlight && this._selectionIsEmpty && this._primaryCursorIsInEditableRange;
}
}

This file was deleted.

This file was deleted.

15 changes: 3 additions & 12 deletions src/vs/editor/common/config/commonEditorConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,14 +277,6 @@ class InternalEditorOptionsHelper {
renderWhitespace = 'none';
}

let renderLineHighlight = opts.renderLineHighlight;
// Compatibility with old true or false values
if (<any>renderLineHighlight === true) {
renderLineHighlight = 'line';
} else if (<any>renderLineHighlight === false) {
renderLineHighlight = 'none';
}

let viewInfo = new editorCommon.InternalEditorViewOptions({
theme: opts.theme,
canUseTranslate3d: canUseTranslate3d,
Expand All @@ -309,7 +301,7 @@ class InternalEditorOptionsHelper {
renderWhitespace: renderWhitespace,
renderControlCharacters: toBoolean(opts.renderControlCharacters),
renderIndentGuides: toBoolean(opts.renderIndentGuides),
renderLineHighlight: renderLineHighlight,
renderLineHighlight: toBoolean(opts.renderLineHighlight),
scrollbar: scrollbar,
fixedOverflowWidgets: toBoolean(opts.fixedOverflowWidgets)
});
Expand Down Expand Up @@ -860,10 +852,9 @@ let editorConfiguration: IConfigurationNode = {
description: nls.localize('renderIndentGuides', "Controls whether the editor should render indent guides")
},
'editor.renderLineHighlight': {
'type': 'string',
'enum': ['none', 'gutter', 'line', 'all'],
'type': 'boolean',
default: DefaultConfig.editor.renderLineHighlight,
description: nls.localize('renderLineHighlight', "Controls how the editor should render the current line highlight, posibilties are 'none', 'gutter', 'line', and 'all'.")
description: nls.localize('renderLineHighlight', "Controls whether the editor should render the current line highlight")
},
'editor.codeLens': {
'type': 'boolean',
Expand Down
2 changes: 1 addition & 1 deletion src/vs/editor/common/config/defaultConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class ConfigClass implements IConfiguration {
renderWhitespace: 'none',
renderControlCharacters: false,
renderIndentGuides: false,
renderLineHighlight: 'all',
renderLineHighlight: true,
useTabStops: true,

fontFamily: (
Expand Down
10 changes: 5 additions & 5 deletions src/vs/editor/common/editorCommon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,9 @@ export interface IEditorOptions {
renderIndentGuides?: boolean;
/**
* Enable rendering of current line highlight.
* Defaults to all.
* Defaults to true.
*/
renderLineHighlight?: 'none' | 'gutter' | 'line' | 'all';
renderLineHighlight?: boolean;
/**
* Inserting and deleting whitespace follows tab stops.
*/
Expand Down Expand Up @@ -669,7 +669,7 @@ export class InternalEditorViewOptions {
readonly renderWhitespace: 'none' | 'boundary' | 'all';
readonly renderControlCharacters: boolean;
readonly renderIndentGuides: boolean;
readonly renderLineHighlight: 'none' | 'gutter' | 'line' | 'all';
readonly renderLineHighlight: boolean;
readonly scrollbar: InternalEditorScrollbarOptions;
readonly fixedOverflowWidgets: boolean;

Expand Down Expand Up @@ -700,7 +700,7 @@ export class InternalEditorViewOptions {
renderWhitespace: 'none' | 'boundary' | 'all';
renderControlCharacters: boolean;
renderIndentGuides: boolean;
renderLineHighlight: 'none' | 'gutter' | 'line' | 'all';
renderLineHighlight: boolean;
scrollbar: InternalEditorScrollbarOptions;
fixedOverflowWidgets: boolean;
}) {
Expand All @@ -727,7 +727,7 @@ export class InternalEditorViewOptions {
this.renderWhitespace = source.renderWhitespace;
this.renderControlCharacters = Boolean(source.renderControlCharacters);
this.renderIndentGuides = Boolean(source.renderIndentGuides);
this.renderLineHighlight = source.renderLineHighlight;
this.renderLineHighlight = Boolean(source.renderLineHighlight);
this.scrollbar = source.scrollbar.clone();
this.fixedOverflowWidgets = Boolean(source.fixedOverflowWidgets);
}
Expand Down
6 changes: 3 additions & 3 deletions src/vs/monaco.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1322,9 +1322,9 @@ declare module monaco.editor {
renderIndentGuides?: boolean;
/**
* Enable rendering of current line highlight.
* Defaults to all.
* Defaults to true.
*/
renderLineHighlight?: 'none' | 'gutter' | 'line' | 'all';
renderLineHighlight?: boolean;
/**
* Inserting and deleting whitespace follows tab stops.
*/
Expand Down Expand Up @@ -1424,7 +1424,7 @@ declare module monaco.editor {
readonly renderWhitespace: 'none' | 'boundary' | 'all';
readonly renderControlCharacters: boolean;
readonly renderIndentGuides: boolean;
readonly renderLineHighlight: 'none' | 'gutter' | 'line' | 'all';
readonly renderLineHighlight: boolean;
readonly scrollbar: InternalEditorScrollbarOptions;
readonly fixedOverflowWidgets: boolean;
}
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/parts/debug/electron-browser/repl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ export class Repl extends Panel implements IPrivateReplService {
lineDecorationsWidth: 0,
scrollBeyondLastLine: false,
theme: this.themeService.getColorTheme(),
renderLineHighlight: 'none',
renderLineHighlight: false,
fixedOverflowWidgets: true,
acceptSuggestionOnEnter: false
};
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/parts/output/browser/outputPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export class OutputPanel extends StringEditor {
options.rulers = [];
options.folding = false;
options.scrollBeyondLastLine = false;
options.renderLineHighlight = 'none';
options.renderLineHighlight = false;

const channel = this.outputService.getActiveChannel();
options.ariaLabel = channel ? nls.localize('outputPanelWithInputAriaLabel', "{0}, Output panel", channel.label) : nls.localize('outputPanelAriaLabel', "Output panel");
Expand Down

0 comments on commit ce97d43

Please sign in to comment.