Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
39f6fded
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
39f6fded
编写于
10月 25, 2016
作者:
J
Joao Moreno
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixedOverflowWidgets setting
related to #13241
上级
91eb8b4b
变更
9
显示空白变更内容
内联
并排
Showing
9 changed file
with
37 addition
and
11 deletion
+37
-11
src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.ts
...editor/browser/viewParts/contentWidgets/contentWidgets.ts
+10
-8
src/vs/editor/browser/widget/diffEditorWidget.ts
src/vs/editor/browser/widget/diffEditorWidget.ts
+1
-0
src/vs/editor/common/config/commonEditorConfig.ts
src/vs/editor/common/config/commonEditorConfig.ts
+1
-0
src/vs/editor/common/config/defaultConfig.ts
src/vs/editor/common/config/defaultConfig.ts
+1
-0
src/vs/editor/common/editorCommon.ts
src/vs/editor/common/editorCommon.ts
+11
-0
src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts
...ditor/contrib/referenceSearch/browser/referencesWidget.ts
+2
-1
src/vs/monaco.d.ts
src/vs/monaco.d.ts
+7
-0
src/vs/workbench/browser/parts/editor/textEditor.ts
src/vs/workbench/browser/parts/editor/textEditor.ts
+2
-1
src/vs/workbench/parts/debug/electron-browser/repl.ts
src/vs/workbench/parts/debug/electron-browser/repl.ts
+2
-1
未找到文件。
src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.ts
浏览文件 @
39f6fded
...
...
@@ -154,7 +154,7 @@ export class ViewContentWidgets extends ViewPart {
this
.
_widgets
[
widget
.
getId
()]
=
widgetData
;
let
domNode
=
widget
.
getDomNode
();
domNode
.
style
.
position
=
'
fixed
'
;
domNode
.
style
.
position
=
this
.
_context
.
configuration
.
editor
.
viewInfo
.
fixedOverflowWidgets
?
'
fixed
'
:
'
absolute
'
;
StyleMutator
.
setMaxWidth
(
domNode
,
this
.
_contentWidth
);
StyleMutator
.
setVisibility
(
domNode
,
'
hidden
'
);
domNode
.
setAttribute
(
'
widgetId
'
,
widget
.
getId
());
...
...
@@ -280,19 +280,21 @@ export class ViewContentWidgets extends ViewPart {
if
(
absoluteLeft
+
width
+
20
>
INNER_WIDTH
)
{
let
delta
=
absoluteLeft
-
(
INNER_WIDTH
-
width
-
20
);
absoluteLeft
-=
delta
;
left
-=
delta
;
}
if
(
absoluteLeft
<
0
)
{
let
delta
=
absoluteLeft
;
absoluteLeft
-=
delta
;
left
-=
delta
;
}
return
{
aboveTop
:
absoluteAboveTop
,
fitsAbove
:
fitsAbove
,
belowTop
:
absoluteBelowTop
,
fitsBelow
:
fitsBelow
,
left
:
absoluteLeft
};
if
(
this
.
_context
.
configuration
.
editor
.
viewInfo
.
fixedOverflowWidgets
)
{
aboveTop
=
absoluteAboveTop
;
belowTop
=
absoluteBelowTop
;
left
=
absoluteLeft
;
}
return
{
aboveTop
,
fitsAbove
,
belowTop
,
fitsBelow
,
left
};
}
private
_prepareRenderWidgetAtExactPosition
(
position
:
Position
,
ctx
:
IRenderingContext
):
IMyWidgetRenderData
{
...
...
src/vs/editor/browser/widget/diffEditorWidget.ts
浏览文件 @
39f6fded
...
...
@@ -849,6 +849,7 @@ export class DiffEditorWidget extends EventEmitter implements editorBrowser.IDif
clonedOptions
.
scrollbar
.
vertical
=
'
visible
'
;
clonedOptions
.
folding
=
false
;
clonedOptions
.
codeLens
=
false
;
clonedOptions
.
fixedOverflowWidgets
=
true
;
return
clonedOptions
;
}
...
...
src/vs/editor/common/config/commonEditorConfig.ts
浏览文件 @
39f6fded
...
...
@@ -296,6 +296,7 @@ class InternalEditorOptionsHelper {
renderIndentGuides
:
toBoolean
(
opts
.
renderIndentGuides
),
renderLineHighlight
:
toBoolean
(
opts
.
renderLineHighlight
),
scrollbar
:
scrollbar
,
fixedOverflowWidgets
:
toBoolean
(
opts
.
fixedOverflowWidgets
)
});
let
contribInfo
=
new
editorCommon
.
EditorContribOptions
({
...
...
src/vs/editor/common/config/defaultConfig.ts
浏览文件 @
39f6fded
...
...
@@ -56,6 +56,7 @@ class ConfigClass implements IConfiguration {
verticalHasArrows
:
false
,
horizontalHasArrows
:
false
},
fixedOverflowWidgets
:
false
,
overviewRulerLanes
:
2
,
cursorBlinking
:
'
blink
'
,
mouseWheelZoom
:
false
,
...
...
src/vs/editor/common/editorCommon.ts
浏览文件 @
39f6fded
...
...
@@ -256,6 +256,11 @@ export interface IEditorOptions {
* Control the behavior and rendering of the scrollbars.
*/
scrollbar
?:
IEditorScrollbarOptions
;
/**
* Display overflow widgets as `fixed`.
* Defaults to `false`.
*/
fixedOverflowWidgets
?:
boolean
;
/**
* The number of vertical lanes the overview ruler should render.
* Defaults to 2.
...
...
@@ -665,6 +670,7 @@ export class InternalEditorViewOptions {
readonly
renderIndentGuides
:
boolean
;
readonly
renderLineHighlight
:
boolean
;
readonly
scrollbar
:
InternalEditorScrollbarOptions
;
readonly
fixedOverflowWidgets
:
boolean
;
/**
* @internal
...
...
@@ -695,6 +701,7 @@ export class InternalEditorViewOptions {
renderIndentGuides
:
boolean
;
renderLineHighlight
:
boolean
;
scrollbar
:
InternalEditorScrollbarOptions
;
fixedOverflowWidgets
:
boolean
;
})
{
this
.
theme
=
String
(
source
.
theme
);
this
.
canUseTranslate3d
=
Boolean
(
source
.
canUseTranslate3d
);
...
...
@@ -721,6 +728,7 @@ export class InternalEditorViewOptions {
this
.
renderIndentGuides
=
Boolean
(
source
.
renderIndentGuides
);
this
.
renderLineHighlight
=
Boolean
(
source
.
renderLineHighlight
);
this
.
scrollbar
=
source
.
scrollbar
.
clone
();
this
.
fixedOverflowWidgets
=
Boolean
(
source
.
fixedOverflowWidgets
);
}
private
static
_toSortedIntegerArray
(
source
:
any
):
number
[]
{
...
...
@@ -781,6 +789,7 @@ export class InternalEditorViewOptions {
&&
this
.
renderIndentGuides
===
other
.
renderIndentGuides
&&
this
.
renderLineHighlight
===
other
.
renderLineHighlight
&&
this
.
scrollbar
.
equals
(
other
.
scrollbar
)
&&
this
.
fixedOverflowWidgets
===
other
.
fixedOverflowWidgets
);
}
...
...
@@ -814,6 +823,7 @@ export class InternalEditorViewOptions {
renderIndentGuides
:
this
.
renderIndentGuides
!==
newOpts
.
renderIndentGuides
,
renderLineHighlight
:
this
.
renderLineHighlight
!==
newOpts
.
renderLineHighlight
,
scrollbar
:
(
!
this
.
scrollbar
.
equals
(
newOpts
.
scrollbar
)),
fixedOverflowWidgets
:
this
.
fixedOverflowWidgets
!==
newOpts
.
fixedOverflowWidgets
};
}
...
...
@@ -851,6 +861,7 @@ export interface IViewConfigurationChangedEvent {
readonly
renderIndentGuides
:
boolean
;
readonly
renderLineHighlight
:
boolean
;
readonly
scrollbar
:
boolean
;
readonly
fixedOverflowWidgets
:
boolean
;
}
export
class
EditorContribOptions
{
...
...
src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts
浏览文件 @
39f6fded
...
...
@@ -556,7 +556,8 @@ export class ReferenceWidget extends PeekViewWidget {
var
options
:
editorCommon
.
IEditorOptions
=
{
scrollBeyondLastLine
:
false
,
scrollbar
:
DefaultConfig
.
editor
.
scrollbar
,
overviewRulerLanes
:
2
overviewRulerLanes
:
2
,
fixedOverflowWidgets
:
true
};
this
.
_preview
=
this
.
_instantiationService
.
createInstance
(
EmbeddedCodeEditorWidget
,
div
.
getHTMLElement
(),
options
,
this
.
editor
);
...
...
src/vs/monaco.d.ts
浏览文件 @
39f6fded
...
...
@@ -1118,6 +1118,11 @@ declare module monaco.editor {
* Control the behavior and rendering of the scrollbars.
*/
scrollbar
?:
IEditorScrollbarOptions
;
/**
* Display overflow widgets as `fixed`.
* Defaults to `false`.
*/
fixedOverflowWidgets
?:
boolean
;
/**
* The number of vertical lanes the overview ruler should render.
* Defaults to 2.
...
...
@@ -1420,6 +1425,7 @@ declare module monaco.editor {
readonly
renderIndentGuides
:
boolean
;
readonly
renderLineHighlight
:
boolean
;
readonly
scrollbar
:
InternalEditorScrollbarOptions
;
readonly
fixedOverflowWidgets
:
boolean
;
}
export
interface
IViewConfigurationChangedEvent
{
...
...
@@ -1448,6 +1454,7 @@ declare module monaco.editor {
readonly
renderIndentGuides
:
boolean
;
readonly
renderLineHighlight
:
boolean
;
readonly
scrollbar
:
boolean
;
readonly
fixedOverflowWidgets
:
boolean
;
}
export
class
EditorContribOptions
{
...
...
src/vs/workbench/browser/parts/editor/textEditor.ts
浏览文件 @
39f6fded
...
...
@@ -119,7 +119,8 @@ export abstract class BaseTextEditor extends BaseEditor {
return
{
overviewRulerLanes
:
3
,
lineNumbersMinChars
:
3
,
theme
:
this
.
themeService
.
getColorTheme
()
theme
:
this
.
themeService
.
getColorTheme
(),
fixedOverflowWidgets
:
true
};
}
...
...
src/vs/workbench/parts/debug/electron-browser/repl.ts
浏览文件 @
39f6fded
...
...
@@ -269,7 +269,8 @@ export class Repl extends Panel implements IPrivateReplService {
lineDecorationsWidth
:
0
,
scrollBeyondLastLine
:
false
,
theme
:
this
.
themeService
.
getColorTheme
(),
renderLineHighlight
:
false
renderLineHighlight
:
false
,
fixedOverflowWidgets
:
true
};
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录