mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-01 03:12:42 +01:00
linted ace2_inner
This commit is contained in:
parent
34c7fb0c46
commit
01fe885adc
1 changed files with 13 additions and 20 deletions
|
@ -3054,11 +3054,7 @@ function Ace2Inner() {
|
|||
|
||||
const isPageDown = evt.which === 34;
|
||||
const isPageUp = evt.which === 33;
|
||||
const linesLength = rep.lines.length();
|
||||
let previousCharacterOffset;
|
||||
|
||||
// boolean - reflects if the user is attempting to highlight content
|
||||
const highlighting = shiftKey && (rep.selStart[0] !== rep.selEnd[0] || rep.selStart[1] !== rep.selEnd[1]);
|
||||
const isShiftKey = shiftKey;
|
||||
if (isPageUp) {
|
||||
// Approach #99991248928175 to solve this problem....
|
||||
|
@ -3128,9 +3124,6 @@ function Ace2Inner() {
|
|||
if (isPageDown) {
|
||||
// Bottom of document - do nothing if we are at the very end
|
||||
// JM TODO: Check if Linemarker modifies width..
|
||||
const lengthOfLastLine = rep.lines.atIndex(rep.selEnd[0]).width - 1;
|
||||
const endOfLine = lengthOfLastLine === rep.selEnd[1];
|
||||
const atBottom = (rep.lines.length() - 1) === rep.selEnd[0];
|
||||
const originalPosition = scroll._getViewPortTopBottom();
|
||||
|
||||
scroll.movePage('down');
|
||||
|
@ -3175,7 +3168,7 @@ function Ace2Inner() {
|
|||
if (!hasMoved && isShiftKey && rep.selFocusAtStart) {
|
||||
// we're at the bottom so select the last bit of content.
|
||||
rep.selStart[0] = rep.selEnd[0];
|
||||
rep.selStart[1] = rep.selEnd[1]
|
||||
rep.selStart[1] = rep.selEnd[1];
|
||||
rep.selEnd[0] = rep.lines.length() - 1;
|
||||
rep.selEnd[1] = rep.lines.atIndex(rep.selStart[0]).length;
|
||||
retainPosition = false;
|
||||
|
|
Loading…
Reference in a new issue