Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
matefun
Frontend
Commits
44c91794
Commit
44c91794
authored
Dec 17, 2018
by
Franco Pariani
Browse files
Fixing scroll after insert line when press Enter
parent
e82edf21
Changes
1
Hide whitespace changes
Inline
Side-by-side
Frontend Angular 4/src/app/layout/matefun/codemirror/matefun-mode-EN.js
View file @
44c91794
...
...
@@ -68,8 +68,10 @@
if
(
next_block
!=
""
){
file
=
file
+
'
\n
'
+
next_block
;
}
var
scrollInfo
=
editor
.
getScrollInfo
();
editor
.
setValue
(
file
);
editor
.
setCursor
(
CodeMirror
.
Pos
(
cur
.
line
,
match
[
1
].
length
+
2
));
editor
.
scrollTo
(
scrollInfo
.
left
,
scrollInfo
.
top
);
}
}
else
{
var
previous_part
=
curLine
.
slice
(
0
,
start
);
...
...
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