Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
235bdabe
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,发现更多精彩内容 >>
提交
235bdabe
编写于
6月 08, 2016
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move SelectionDirection to selection.ts
上级
7f14d8c3
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
25 addition
and
26 deletion
+25
-26
build/monaco/monaco.d.ts.recipe
build/monaco/monaco.d.ts.recipe
+2
-2
src/vs/editor/common/controller/cursor.ts
src/vs/editor/common/controller/cursor.ts
+2
-2
src/vs/editor/common/controller/oneCursor.ts
src/vs/editor/common/controller/oneCursor.ts
+3
-3
src/vs/editor/common/core/selection.ts
src/vs/editor/common/core/selection.ts
+15
-1
src/vs/editor/common/editorCommon.ts
src/vs/editor/common/editorCommon.ts
+0
-14
src/vs/editor/common/standalone/standaloneBase.ts
src/vs/editor/common/standalone/standaloneBase.ts
+1
-2
src/vs/editor/contrib/linesOperations/common/copyLinesCommand.ts
...editor/contrib/linesOperations/common/copyLinesCommand.ts
+2
-2
未找到文件。
build/monaco/monaco.d.ts.recipe
浏览文件 @
235bdabe
...
...
@@ -41,10 +41,10 @@ declare module monaco {
#include(vs/base/browser/keyboardEvent): IKeyboardEvent
#include(vs/base/browser/mouseEvent): IMouseEvent
#include(vs/editor/common/editorCommon): IScrollEvent
#include(vs/editor/common/editorCommon): IPosition, IRange,
SelectionDirection,
ISelection
#include(vs/editor/common/editorCommon): IPosition, IRange, ISelection
#include(vs/editor/common/core/position): Position
#include(vs/editor/common/core/range): Range
#include(vs/editor/common/core/selection): Selection
#include(vs/editor/common/core/selection): Selection
, SelectionDirection
}
declare module monaco.editor {
...
...
src/vs/editor/common/controller/cursor.ts
浏览文件 @
235bdabe
...
...
@@ -13,7 +13,7 @@ import {CursorCollection, ICursorCollectionState} from 'vs/editor/common/control
import
{
WordNavigationType
,
IOneCursorOperationContext
,
IPostOperationRunnable
,
IViewModelHelper
,
OneCursor
,
OneCursorOp
}
from
'
vs/editor/common/controller/oneCursor
'
;
import
{
Position
}
from
'
vs/editor/common/core/position
'
;
import
{
Range
}
from
'
vs/editor/common/core/range
'
;
import
{
Selection
}
from
'
vs/editor/common/core/selection
'
;
import
{
Selection
,
SelectionDirection
}
from
'
vs/editor/common/core/selection
'
;
import
*
as
editorCommon
from
'
vs/editor/common/editorCommon
'
;
import
{
IColumnSelectResult
}
from
'
vs/editor/common/controller/cursorMoveHelper
'
;
import
{
LanguageConfigurationRegistry
}
from
'
vs/editor/common/modes/languageConfigurationRegistry
'
;
...
...
@@ -527,7 +527,7 @@ export class Cursor extends EventEmitter {
}
}
}
else
{
if
(
selection
.
getDirection
()
===
editorCommon
.
SelectionDirection
.
LTR
)
{
if
(
selection
.
getDirection
()
===
SelectionDirection
.
LTR
)
{
selectionMarkerStickToPreviousCharacter
=
false
;
positionMarkerStickToPreviousCharacter
=
true
;
}
else
{
...
...
src/vs/editor/common/controller/oneCursor.ts
浏览文件 @
235bdabe
...
...
@@ -12,7 +12,7 @@ import {SurroundSelectionCommand} from 'vs/editor/common/commands/surroundSelect
import
{
CursorMoveHelper
,
ICursorMoveHelperModel
,
IMoveResult
,
IColumnSelectResult
,
IViewColumnSelectResult
}
from
'
vs/editor/common/controller/cursorMoveHelper
'
;
import
{
Position
}
from
'
vs/editor/common/core/position
'
;
import
{
Range
}
from
'
vs/editor/common/core/range
'
;
import
{
Selection
}
from
'
vs/editor/common/core/selection
'
;
import
{
Selection
,
SelectionDirection
}
from
'
vs/editor/common/core/selection
'
;
import
*
as
editorCommon
from
'
vs/editor/common/editorCommon
'
;
import
{
IElectricAction
,
IndentAction
}
from
'
vs/editor/common/modes
'
;
import
{
LanguageConfigurationRegistry
}
from
'
vs/editor/common/modes/languageConfigurationRegistry
'
;
...
...
@@ -144,7 +144,7 @@ export class OneCursor {
private
_cachedViewSelection
:
Selection
;
private
_selStartMarker
:
string
;
private
_selEndMarker
:
string
;
private
_selDirection
:
editorCommon
.
SelectionDirection
;
private
_selDirection
:
SelectionDirection
;
constructor
(
editorId
:
number
,
...
...
@@ -415,7 +415,7 @@ export class OneCursor {
let
start
=
this
.
model
.
_getMarker
(
this
.
_selStartMarker
);
let
end
=
this
.
model
.
_getMarker
(
this
.
_selEndMarker
);
if
(
this
.
_selDirection
===
editorCommon
.
SelectionDirection
.
LTR
)
{
if
(
this
.
_selDirection
===
SelectionDirection
.
LTR
)
{
return
new
Selection
(
start
.
lineNumber
,
start
.
column
,
end
.
lineNumber
,
end
.
column
);
}
...
...
src/vs/editor/common/core/selection.ts
浏览文件 @
235bdabe
...
...
@@ -5,7 +5,21 @@
'
use strict
'
;
import
{
Range
}
from
'
vs/editor/common/core/range
'
;
import
{
ISelection
,
SelectionDirection
}
from
'
vs/editor/common/editorCommon
'
;
import
{
ISelection
}
from
'
vs/editor/common/editorCommon
'
;
/**
* The direction of a selection.
*/
export
enum
SelectionDirection
{
/**
* The selection starts above where it ends.
*/
LTR
,
/**
* The selection starts below where it ends.
*/
RTL
}
/**
* A selection in the editor.
...
...
src/vs/editor/common/editorCommon.ts
浏览文件 @
235bdabe
...
...
@@ -87,20 +87,6 @@ export interface ISelection {
positionColumn
:
number
;
}
/**
* The direction of a selection.
*/
export
enum
SelectionDirection
{
/**
* The selection starts above where it ends.
*/
LTR
,
/**
* The selection starts below where it ends.
*/
RTL
}
/**
* Configuration options for editor scrollbars
*/
...
...
src/vs/editor/common/standalone/standaloneBase.ts
浏览文件 @
235bdabe
...
...
@@ -8,8 +8,7 @@ import {Emitter} from 'vs/base/common/event';
import
{
KeyCode
,
KeyMod
}
from
'
vs/base/common/keyCodes
'
;
import
{
Position
}
from
'
vs/editor/common/core/position
'
;
import
{
Range
}
from
'
vs/editor/common/core/range
'
;
import
{
Selection
}
from
'
vs/editor/common/core/selection
'
;
import
{
SelectionDirection
}
from
'
vs/editor/common/editorCommon
'
;
import
{
Selection
,
SelectionDirection
}
from
'
vs/editor/common/core/selection
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
CancellationTokenSource
}
from
'
vs/base/common/cancellation
'
;
import
Severity
from
'
vs/base/common/severity
'
;
...
...
src/vs/editor/contrib/linesOperations/common/copyLinesCommand.ts
浏览文件 @
235bdabe
...
...
@@ -5,7 +5,7 @@
'
use strict
'
;
import
{
Range
}
from
'
vs/editor/common/core/range
'
;
import
{
Selection
}
from
'
vs/editor/common/core/selection
'
;
import
{
Selection
,
SelectionDirection
}
from
'
vs/editor/common/core/selection
'
;
import
*
as
editorCommon
from
'
vs/editor/common/editorCommon
'
;
export
class
CopyLinesCommand
implements
editorCommon
.
ICommand
{
...
...
@@ -13,7 +13,7 @@ export class CopyLinesCommand implements editorCommon.ICommand {
private
_selection
:
Selection
;
private
_isCopyingDown
:
boolean
;
private
_selectionDirection
:
editorCommon
.
SelectionDirection
;
private
_selectionDirection
:
SelectionDirection
;
private
_selectionId
:
string
;
private
_startLineNumberDelta
:
number
;
private
_endLineNumberDelta
:
number
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录