Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
5a46bd04
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5a46bd04
编写于
4月 06, 2016
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Towards adding indent guides
上级
cd12a7e3
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
113 addition
and
136 deletion
+113
-136
src/vs/editor/browser/standalone/colorizer.ts
src/vs/editor/browser/standalone/colorizer.ts
+2
-2
src/vs/editor/browser/viewParts/lines/viewLine.ts
src/vs/editor/browser/viewParts/lines/viewLine.ts
+5
-5
src/vs/editor/browser/widget/media/editor.css
src/vs/editor/browser/widget/media/editor.css
+6
-1
src/vs/editor/common/viewLayout/viewLineParts.ts
src/vs/editor/common/viewLayout/viewLineParts.ts
+70
-105
src/vs/editor/common/viewLayout/viewLineRenderer.ts
src/vs/editor/common/viewLayout/viewLineRenderer.ts
+30
-23
未找到文件。
src/vs/editor/browser/standalone/colorizer.ts
浏览文件 @
5a46bd04
...
...
@@ -9,7 +9,7 @@ import {TPromise} from 'vs/base/common/winjs.base';
import
{
ViewLineToken
,
IModel
}
from
'
vs/editor/common/editorCommon
'
;
import
{
ILineTokens
,
IMode
}
from
'
vs/editor/common/modes
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
I
RenderLineOutput
,
renderLine
,
RenderLineInput
}
from
'
vs/editor/common/viewLayout/viewLineRenderer
'
;
import
{
RenderLineOutput
,
renderLine
,
RenderLineInput
}
from
'
vs/editor/common/viewLayout/viewLineRenderer
'
;
import
*
as
TokensBinaryEncoding
from
'
vs/editor/common/model/tokensBinaryEncoding
'
;
export
interface
IColorizerOptions
{
...
...
@@ -126,7 +126,7 @@ function actualColorize(lines:string[], mode:IMode, tabSize:number): IActualColo
length
:
number
,
line
:
string
,
tokenizeResult
:
ILineTokens
,
renderResult
:
I
RenderLineOutput
,
renderResult
:
RenderLineOutput
,
retokenize
:
TPromise
<
void
>
[]
=
[];
for
(
i
=
0
,
length
=
lines
.
length
;
i
<
length
;
i
++
)
{
...
...
src/vs/editor/browser/viewParts/lines/viewLine.ts
浏览文件 @
5a46bd04
...
...
@@ -7,7 +7,7 @@
import
*
as
browser
from
'
vs/base/browser/browser
'
;
import
{
FastDomNode
,
createFastDomNode
}
from
'
vs/base/browser/styleMutator
'
;
import
{
HorizontalRange
,
IConfigurationChangedEvent
,
IModelDecoration
}
from
'
vs/editor/common/editorCommon
'
;
import
{
I
LineParts
,
createLineParts
,
getColumnOfLinePartOffset
}
from
'
vs/editor/common/viewLayout/viewLineParts
'
;
import
{
LineParts
,
createLineParts
,
getColumnOfLinePartOffset
}
from
'
vs/editor/common/viewLayout/viewLineParts
'
;
import
{
renderLine
,
RenderLineInput
}
from
'
vs/editor/common/viewLayout/viewLineRenderer
'
;
import
{
ClassNames
,
IViewContext
}
from
'
vs/editor/browser/editorBrowser
'
;
import
{
IVisibleLineData
}
from
'
vs/editor/browser/view/viewLayer
'
;
...
...
@@ -24,7 +24,7 @@ export class ViewLine implements IVisibleLineData {
private
_domNode
:
FastDomNode
;
private
_lineParts
:
I
LineParts
;
private
_lineParts
:
LineParts
;
private
_isInvalid
:
boolean
;
private
_isMaybeInvalid
:
boolean
;
...
...
@@ -99,7 +99,7 @@ export class ViewLine implements IVisibleLineData {
}
public
shouldUpdateHTML
(
startLineNumber
:
number
,
lineNumber
:
number
,
inlineDecorations
:
IModelDecoration
[]):
boolean
{
let
newLineParts
:
I
LineParts
=
null
;
let
newLineParts
:
LineParts
=
null
;
if
(
this
.
_isMaybeInvalid
||
this
.
_isInvalid
)
{
// Compute new line parts only if there is some evidence that something might have changed
...
...
@@ -158,7 +158,7 @@ export class ViewLine implements IVisibleLineData {
// --- end IVisibleLineData
private
_render
(
lineNumber
:
number
,
lineParts
:
I
LineParts
):
string
{
private
_render
(
lineNumber
:
number
,
lineParts
:
LineParts
):
string
{
this
.
_cachedWidth
=
-
1
;
...
...
@@ -346,7 +346,7 @@ class WebKitViewLine extends ViewLine {
}
function
findIndexInArrayWithMax
(
lineParts
:
I
LineParts
,
desiredIndex
:
number
,
maxResult
:
number
):
number
{
function
findIndexInArrayWithMax
(
lineParts
:
LineParts
,
desiredIndex
:
number
,
maxResult
:
number
):
number
{
let
r
=
lineParts
.
findIndexOfOffset
(
desiredIndex
);
return
r
<=
maxResult
?
r
:
maxResult
;
}
...
...
src/vs/editor/browser/widget/media/editor.css
浏览文件 @
5a46bd04
...
...
@@ -14,7 +14,12 @@
}
.monaco-editor
.token.whitespace
{
display
:
inline-block
;
}
/*.monaco-editor .token.leading.whitespace { border-left:1px solid lightgrey; }*/
.monaco-editor
.token.indent-guide
{
display
:
inline-block
;
border-left
:
1px
solid
lightgray
;
box-sizing
:
border-box
;
}
.monaco-editor.enable-ligatures
{
-webkit-font-feature-settings
:
"liga"
on
,
"calt"
on
;
...
...
src/vs/editor/common/viewLayout/viewLineParts.ts
浏览文件 @
5a46bd04
...
...
@@ -9,32 +9,25 @@ import {Arrays} from 'vs/editor/common/core/arrays';
import
{
ViewLineToken
,
IEditorRange
,
ViewLineTokens
}
from
'
vs/editor/common/editorCommon
'
;
import
{
Range
}
from
'
vs/editor/common/core/range
'
;
export
interface
ILineParts
{
getParts
():
ViewLineToken
[];
equals
(
other
:
ILineParts
):
boolean
;
findIndexOfOffset
(
offset
:
number
):
number
;
}
const
INDENT_GUIDES
=
false
;
function
cmpLineDecorations
(
a
:
ILineDecoration
,
b
:
ILineDecoration
):
number
{
return
Range
.
compareRangesUsingStarts
(
a
.
range
,
b
.
range
);
}
export
function
createLineParts
(
lineNumber
:
number
,
minLineColumn
:
number
,
lineContent
:
string
,
tabSize
:
number
,
lineTokens
:
ViewLineTokens
,
rawLineDecorations
:
ILineDecoration
[],
renderWhitespace
:
boolean
):
I
LineParts
{
if
(
renderWhitespace
)
{
export
function
createLineParts
(
lineNumber
:
number
,
minLineColumn
:
number
,
lineContent
:
string
,
tabSize
:
number
,
lineTokens
:
ViewLineTokens
,
rawLineDecorations
:
ILineDecoration
[],
renderWhitespace
:
boolean
):
LineParts
{
if
(
INDENT_GUIDES
||
renderWhitespace
)
{
let
oldLength
=
rawLineDecorations
.
length
;
rawLineDecorations
=
insertWhitespace
(
lineNumber
,
lineContent
,
tabSize
,
lineTokens
.
getFauxIndentLength
(),
rawLineDecorations
);
rawLineDecorations
=
insertWhitespace
(
INDENT_GUIDES
,
renderWhitespace
,
lineNumber
,
lineContent
,
tabSize
,
lineTokens
.
getFauxIndentLength
(),
rawLineDecorations
);
if
(
rawLineDecorations
.
length
!==
oldLength
)
{
rawLineDecorations
.
sort
(
cmpLineDecorations
);
}
}
if
(
rawLineDecorations
.
length
>
0
)
{
return
new
ViewLineParts
(
lineNumber
,
minLineColumn
,
lineTokens
,
lineContent
,
rawLineDecorations
);
return
create
ViewLineParts
(
lineNumber
,
minLineColumn
,
lineTokens
,
lineContent
,
rawLineDecorations
);
}
else
{
return
new
FastViewLineParts
(
lineTokens
,
lineContent
);
return
create
FastViewLineParts
(
lineTokens
,
lineContent
);
}
}
...
...
@@ -113,7 +106,7 @@ function insertOneWhitespace(dest:ILineDecoration[], lineNumber:number, startCol
});
}
function
insertWhitespace
(
lineNumber
:
number
,
lineContent
:
string
,
tabSize
:
number
,
fauxIndentLength
:
number
,
rawLineDecorations
:
ILineDecoration
[]):
ILineDecoration
[]
{
function
insertWhitespace
(
renderIndentGuides
:
boolean
,
renderWhitespace
:
boolean
,
lineNumber
:
number
,
lineContent
:
string
,
tabSize
:
number
,
fauxIndentLength
:
number
,
rawLineDecorations
:
ILineDecoration
[]):
ILineDecoration
[]
{
let
lineLength
=
lineContent
.
length
;
if
(
lineLength
===
fauxIndentLength
)
{
return
rawLineDecorations
;
...
...
@@ -140,6 +133,20 @@ function insertWhitespace(lineNumber:number, lineContent: string, tabSize:number
let
result
=
rawLineDecorations
.
slice
(
0
);
let
tmpIndent
=
0
;
let
whitespaceStartColumn
=
fauxIndentLength
+
1
;
let
leadingClassName
=
''
;
if
(
renderIndentGuides
)
{
leadingClassName
+=
'
indent-guide
'
;
}
if
(
renderWhitespace
)
{
leadingClassName
+=
'
leading whitespace
'
;
}
let
trailingClassName
=
''
;
if
(
renderWhitespace
)
{
trailingClassName
+=
'
trailing whitespace
'
;
}
for
(
let
i
=
fauxIndentLength
;
i
<
lineLength
;
i
++
)
{
let
chCode
=
lineContent
.
charCodeAt
(
i
);
...
...
@@ -153,7 +160,7 @@ function insertWhitespace(lineNumber:number, lineContent: string, tabSize:number
// in leading whitespace
// push for every indent or when the end of the leading whitespace is reached
if
(
tmpIndent
>=
tabSize
||
i
===
firstNonWhitespaceIndex
-
1
)
{
insertOneWhitespace
(
result
,
lineNumber
,
whitespaceStartColumn
,
i
+
2
,
'
leading whitespace
'
);
insertOneWhitespace
(
result
,
lineNumber
,
whitespaceStartColumn
,
i
+
2
,
leadingClassName
);
whitespaceStartColumn
=
i
+
2
;
tmpIndent
=
0
;
}
...
...
@@ -164,7 +171,7 @@ function insertWhitespace(lineNumber:number, lineContent: string, tabSize:number
// in trailing whitespace
// push for every indent or when the end of the string is reached
if
(
tmpIndent
>=
tabSize
||
i
===
lineLength
-
1
)
{
insertOneWhitespace
(
result
,
lineNumber
,
whitespaceStartColumn
,
i
+
2
,
'
trailing whitespace
'
);
insertOneWhitespace
(
result
,
lineNumber
,
whitespaceStartColumn
,
i
+
2
,
trailingClassName
);
whitespaceStartColumn
=
i
+
2
;
tmpIndent
=
0
;
}
...
...
@@ -180,119 +187,77 @@ function insertWhitespace(lineNumber:number, lineContent: string, tabSize:number
return
result
;
}
export
class
FastViewLineParts
implements
ILineParts
{
export
class
LineParts
{
_linePartsTrait
:
void
;
private
_parts
:
ViewLineToken
[];
private
lineTokens
:
ViewLineTokens
;
private
parts
:
ViewLineToken
[];
constructor
(
lineTokens
:
ViewLineTokens
,
lineContent
:
string
)
{
this
.
lineTokens
=
lineTokens
;
this
.
parts
=
lineTokens
.
getTokens
();
this
.
parts
=
trimEmptyTrailingPart
(
this
.
parts
,
lineContent
);
constructor
(
parts
:
ViewLineToken
[])
{
this
.
_parts
=
parts
;
}
public
getParts
():
ViewLineToken
[]{
return
this
.
parts
;
public
getParts
():
ViewLineToken
[]
{
return
this
.
_
parts
;
}
public
equals
(
other
:
ILineParts
):
boolean
{
if
(
other
instanceof
FastViewLineParts
)
{
var
otherFastLineParts
=
<
FastViewLineParts
>
other
;
return
this
.
lineTokens
.
equals
(
otherFastLineParts
.
lineTokens
);
}
return
false
;
public
equals
(
other
:
LineParts
):
boolean
{
return
ViewLineToken
.
equalsArray
(
this
.
_parts
,
other
.
_parts
);
}
public
findIndexOfOffset
(
offset
:
number
):
number
{
return
Arrays
.
findIndexInSegmentsArray
(
this
.
parts
,
offset
);
return
Arrays
.
findIndexInSegmentsArray
(
this
.
_
parts
,
offset
);
}
}
export
class
ViewLineParts
implements
ILineParts
{
private
parts
:
ViewLineToken
[];
private
lastPartIndex
:
number
;
private
lastEndOffset
:
number
;
constructor
(
lineNumber
:
number
,
minLineColumn
:
number
,
lineTokens
:
ViewLineTokens
,
lineContent
:
string
,
rawLineDecorations
:
ILineDecoration
[])
{
// lineDecorations might overlap on top of each other, so they need to be normalized
var
lineDecorations
=
LineDecorationsNormalizer
.
normalize
(
lineNumber
,
minLineColumn
,
rawLineDecorations
),
lineDecorationsIndex
=
0
,
lineDecorationsLength
=
lineDecorations
.
length
;
var
actualLineTokens
=
lineTokens
.
getTokens
(),
nextStartOffset
:
number
,
currentTokenEndOffset
:
number
,
currentTokenClassName
:
string
;
function
createFastViewLineParts
(
lineTokens
:
ViewLineTokens
,
lineContent
:
string
):
LineParts
{
let
parts
=
lineTokens
.
getTokens
();
parts
=
trimEmptyTrailingPart
(
parts
,
lineContent
);
return
new
LineParts
(
parts
);
}
var
parts
:
ViewLineToken
[]
=
[];
function
createViewLineParts
(
lineNumber
:
number
,
minLineColumn
:
number
,
lineTokens
:
ViewLineTokens
,
lineContent
:
string
,
rawLineDecorations
:
ILineDecoration
[]):
LineParts
{
// lineDecorations might overlap on top of each other, so they need to be normalized
var
lineDecorations
=
LineDecorationsNormalizer
.
normalize
(
lineNumber
,
minLineColumn
,
rawLineDecorations
),
lineDecorationsIndex
=
0
,
lineDecorationsLength
=
lineDecorations
.
length
;
for
(
var
i
=
0
,
len
=
actualLineTokens
.
length
;
i
<
len
;
i
++
)
{
nextStartOffset
=
actualLineTokens
[
i
].
startIndex
;
currentTokenEndOffset
=
(
i
+
1
<
len
?
actualLineTokens
[
i
+
1
].
startIndex
:
lineTokens
.
getTextLength
());
currentTokenClassName
=
actualLineTokens
[
i
].
type
;
var
actualLineTokens
=
lineTokens
.
getTokens
(),
nextStartOffset
:
number
,
currentTokenEndOffset
:
number
,
currentTokenClassName
:
string
;
while
(
lineDecorationsIndex
<
lineDecorationsLength
&&
lineDecorations
[
lineDecorationsIndex
].
startOffset
<
currentTokenEndOffset
)
{
if
(
lineDecorations
[
lineDecorationsIndex
].
startOffset
>
nextStartOffset
)
{
// the first decorations starts after the token
parts
.
push
(
new
ViewLineToken
(
nextStartOffset
,
currentTokenClassName
));
nextStartOffset
=
lineDecorations
[
lineDecorationsIndex
].
startOffset
;
}
var
parts
:
ViewLineToken
[]
=
[];
parts
.
push
(
new
ViewLineToken
(
nextStartOffset
,
currentTokenClassName
+
'
'
+
lineDecorations
[
lineDecorationsIndex
].
className
));
if
(
lineDecorations
[
lineDecorationsIndex
].
endOffset
>=
currentTokenEndOffset
)
{
// this decoration goes on to the next token
nextStartOffset
=
currentTokenEndOffset
;
break
;
}
else
{
// this decorations stops inside this token
nextStartOffset
=
lineDecorations
[
lineDecorationsIndex
].
endOffset
+
1
;
lineDecorationsIndex
++
;
}
}
for
(
var
i
=
0
,
len
=
actualLineTokens
.
length
;
i
<
len
;
i
++
)
{
nextStartOffset
=
actualLineTokens
[
i
].
startIndex
;
currentTokenEndOffset
=
(
i
+
1
<
len
?
actualLineTokens
[
i
+
1
].
startIndex
:
lineTokens
.
getTextLength
());
currentTokenClassName
=
actualLineTokens
[
i
].
type
;
if
(
nextStartOffset
<
currentTokenEndOffset
)
{
while
(
lineDecorationsIndex
<
lineDecorationsLength
&&
lineDecorations
[
lineDecorationsIndex
].
startOffset
<
currentTokenEndOffset
)
{
if
(
lineDecorations
[
lineDecorationsIndex
].
startOffset
>
nextStartOffset
)
{
// the first decorations starts after the token
parts
.
push
(
new
ViewLineToken
(
nextStartOffset
,
currentTokenClassName
));
nextStartOffset
=
lineDecorations
[
lineDecorationsIndex
].
startOffset
;
}
}
this
.
parts
=
parts
;
this
.
lastPartIndex
=
parts
.
length
-
1
;
this
.
lastEndOffset
=
currentTokenEndOffset
;
}
public
getParts
():
ViewLineToken
[]
{
return
this
.
parts
;
}
parts
.
push
(
new
ViewLineToken
(
nextStartOffset
,
currentTokenClassName
+
'
'
+
lineDecorations
[
lineDecorationsIndex
].
className
));
public
equals
(
other
:
ILineParts
):
boolean
{
if
(
other
instanceof
ViewLineParts
)
{
var
otherSimpleLineParts
=
<
ViewLineParts
>
other
;
if
(
this
.
lastPartIndex
!==
otherSimpleLineParts
.
lastPartIndex
)
{
return
false
;
}
if
(
this
.
lastEndOffset
!==
otherSimpleLineParts
.
lastEndOffset
)
{
return
false
;
}
for
(
var
i
=
0
,
len
=
this
.
parts
.
length
;
i
<
len
;
i
++
)
{
if
(
this
.
parts
[
i
].
startIndex
!==
otherSimpleLineParts
.
parts
[
i
].
startIndex
)
{
return
false
;
}
if
(
this
.
parts
[
i
].
type
!==
otherSimpleLineParts
.
parts
[
i
].
type
)
{
return
false
;
}
if
(
lineDecorations
[
lineDecorationsIndex
].
endOffset
>=
currentTokenEndOffset
)
{
// this decoration goes on to the next token
nextStartOffset
=
currentTokenEndOffset
;
break
;
}
else
{
// this decorations stops inside this token
nextStartOffset
=
lineDecorations
[
lineDecorationsIndex
].
endOffset
+
1
;
lineDecorationsIndex
++
;
}
return
true
;
}
return
false
;
}
public
findIndexOfOffset
(
offset
:
number
):
number
{
return
Arrays
.
findIndexInSegmentsArray
(
this
.
parts
,
offset
);
if
(
nextStartOffset
<
currentTokenEndOffset
)
{
parts
.
push
(
new
ViewLineToken
(
nextStartOffset
,
currentTokenClassName
));
}
}
return
new
LineParts
(
parts
);
}
export
class
DecorationSegment
{
...
...
src/vs/editor/common/viewLayout/viewLineRenderer.ts
浏览文件 @
5a46bd04
...
...
@@ -33,10 +33,17 @@ export class RenderLineInput {
}
}
export
interface
IRenderLineOutput
{
export
class
RenderLineOutput
{
_renderLineOutputTrait
:
void
;
charOffsetInPart
:
number
[];
lastRenderedPartIndex
:
number
;
output
:
string
;
constructor
(
charOffsetInPart
:
number
[],
lastRenderedPartIndex
:
number
,
output
:
string
)
{
this
.
charOffsetInPart
=
charOffsetInPart
;
this
.
lastRenderedPartIndex
=
lastRenderedPartIndex
;
this
.
output
=
output
;
}
}
const
_space
=
'
'
.
charCodeAt
(
0
);
...
...
@@ -48,7 +55,7 @@ const _carriageReturn = '\r'.charCodeAt(0);
const
_lineSeparator
=
'
\
u2028
'
.
charCodeAt
(
0
);
//http://www.fileformat.info/info/unicode/char/2028/index.htm
const
_bom
=
65279
;
export
function
renderLine
(
input
:
RenderLineInput
):
I
RenderLineOutput
{
export
function
renderLine
(
input
:
RenderLineInput
):
RenderLineOutput
{
const
lineText
=
input
.
lineContent
;
const
lineTextLength
=
lineText
.
length
;
const
tabSize
=
input
.
tabSize
;
...
...
@@ -58,12 +65,12 @@ export function renderLine(input:RenderLineInput): IRenderLineOutput {
const
charBreakIndex
=
(
input
.
stopRenderingLineAfter
===
-
1
?
lineTextLength
:
input
.
stopRenderingLineAfter
-
1
);
if
(
lineTextLength
===
0
)
{
return
{
charOffsetInPart
:
[],
lastRenderedPartIndex
:
0
,
return
new
RenderLineOutput
(
[],
0
,
// This is basically for IE's hit test to work
output
:
'
<span><span> </span></span>
'
}
;
'
<span><span> </span></span>
'
)
;
}
if
(
actualLineParts
.
length
===
0
)
{
...
...
@@ -78,7 +85,7 @@ function isWhitespace(type:string): boolean {
return
WHITESPACE_TOKEN_TEST
.
test
(
type
);
}
function
renderLineActual
(
lineText
:
string
,
lineTextLength
:
number
,
tabSize
:
number
,
spaceWidth
:
number
,
actualLineParts
:
ViewLineToken
[],
renderWhitespace
:
boolean
,
charBreakIndex
:
number
):
I
RenderLineOutput
{
function
renderLineActual
(
lineText
:
string
,
lineTextLength
:
number
,
tabSize
:
number
,
spaceWidth
:
number
,
actualLineParts
:
ViewLineToken
[],
renderWhitespace
:
boolean
,
charBreakIndex
:
number
):
RenderLineOutput
{
lineTextLength
=
+
lineTextLength
;
tabSize
=
+
tabSize
;
charBreakIndex
=
+
charBreakIndex
;
...
...
@@ -140,11 +147,11 @@ function renderLineActual(lineText:string, lineTextLength:number, tabSize:number
out
+=
partContent
;
out
+=
'
…</span></span>
'
;
charOffsetInPartArr
[
charIndex
]
=
charOffsetInPart
;
return
{
charOffsetInPart
:
charOffsetInPart
Arr
,
lastRenderedPartIndex
:
partIndex
,
out
put
:
out
}
;
return
new
RenderLineOutput
(
charOffsetInPartArr
,
partIndex
,
out
)
;
}
}
out
+=
'
<span class="token
'
+
part
.
type
+
'
" style="width:
'
+
(
spaceWidth
*
partContentCnt
)
+
'
px">
'
;
...
...
@@ -213,11 +220,11 @@ function renderLineActual(lineText:string, lineTextLength:number, tabSize:number
if
(
charIndex
>=
charBreakIndex
)
{
out
+=
'
…</span></span>
'
;
charOffsetInPartArr
[
charIndex
]
=
charOffsetInPart
;
return
{
charOffsetInPart
:
charOffsetInPart
Arr
,
lastRenderedPartIndex
:
partIndex
,
out
put
:
out
}
;
return
new
RenderLineOutput
(
charOffsetInPartArr
,
partIndex
,
out
)
;
}
}
...
...
@@ -231,9 +238,9 @@ function renderLineActual(lineText:string, lineTextLength:number, tabSize:number
// text range at the end of the span, insteaf of at the beginning of next span
charOffsetInPartArr
.
push
(
charOffsetInPart
);
return
{
charOffsetInPart
:
charOffsetInPart
Arr
,
lastRenderedPartIndex
:
actualLineParts
.
length
-
1
,
out
put
:
out
}
;
return
new
RenderLineOutput
(
charOffsetInPartArr
,
actualLineParts
.
length
-
1
,
out
)
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录