Skip to content

Commit

Permalink
CE: Fix selection ArrowDown on last line
Browse files Browse the repository at this point in the history
  • Loading branch information
jxarco committed Jan 31, 2024
1 parent 4f4ad5c commit a5d8d63
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions build/components/codeeditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -865,16 +865,17 @@ class CodeEditor {
if( !this.selection )
this.startSelection( cursor );

this.lineDown( cursor );

const canGoDown = this.lineDown( cursor );
var letter = this.getCharAtPos( cursor );
if( !letter ) {
this.cursorToPosition( cursor, Math.max(this.code.lines[ cursor.line ].length - 1, 0) );

if( !letter || !canGoDown ) {
this.actions[ 'End' ].callback( cursor.line, cursor, e );
}

this.processSelection( e );
} else {

}
else
{
if( this.code.lines[ ln + 1 ] == undefined )
return;
this.endSelection();
Expand Down

0 comments on commit a5d8d63

Please sign in to comment.