Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
sdkjs
Commits
f7d09b33
Commit
f7d09b33
authored
8 years ago
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update cursor by top line
parent
8c98e7fe
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
cell/view/CellEditorView.js
cell/view/CellEditorView.js
+14
-10
No files found.
cell/view/CellEditorView.js
View file @
f7d09b33
...
...
@@ -1594,18 +1594,21 @@
// при такой комбинации ctrl+a, click, ctrl+a, click не обновляется selectionStart
// поэтому выполняем обработку после обработчика системы
setTimeout
(
function
()
{
var
b
=
t
.
input
.
selectionStart
;
var
e
=
t
.
input
.
selectionEnd
;
if
(
typeof
b
!==
"
undefined
"
)
{
if
(
t
.
cursorPos
!==
b
||
t
.
selectionBegin
!==
t
.
selectionEnd
)
{
t
.
_moveCursor
(
kPosition
,
b
);
}
if
(
b
!==
e
)
{
t
.
_selectChars
(
kPosition
,
e
);
}
}
t
.
_updateCursorByTopLine
();
});
};
CellEditor
.
prototype
.
_updateCursorByTopLine
=
function
()
{
var
b
=
this
.
input
.
selectionStart
;
var
e
=
this
.
input
.
selectionEnd
;
if
(
typeof
b
!==
"
undefined
"
)
{
if
(
this
.
cursorPos
!==
b
||
this
.
selectionBegin
!==
t
.
selectionEnd
)
{
this
.
_moveCursor
(
kPosition
,
b
);
}
if
(
b
!==
e
)
{
this
.
_selectChars
(
kPosition
,
e
);
}
}
};
CellEditor
.
prototype
.
_syncEditors
=
function
()
{
var
t
=
this
;
...
...
@@ -2676,6 +2679,7 @@
}
this
.
skipTLUpdate
=
true
;
this
.
replaceText
(
0
,
this
.
textRender
.
getEndOfLine
(
this
.
cursorPos
),
this
.
input
.
value
);
this
.
_updateCursorByTopLine
();
return
true
;
};
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment