mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Fix crash when trying to move lines out of bounds
This commit is contained in:
parent
07daddb3f3
commit
cc3bc66ca4
1 changed files with 6 additions and 2 deletions
|
@ -3666,12 +3666,16 @@ namespace IDE.ui
|
|||
public void MoveLine(VertDir dir)
|
||||
{
|
||||
int lineNum = CursorLineAndColumn.mLine;
|
||||
|
||||
if ((dir == .Up && lineNum < 1) || (dir == .Down && lineNum >= GetLineCount() - 1))
|
||||
return;
|
||||
|
||||
int endLineNum = lineNum;
|
||||
|
||||
GetLinePosition(lineNum, var lineStart, ?);
|
||||
|
||||
|
||||
// Copy collapsed lines below as well
|
||||
while (endLineNum < mLineCoords.Count - 1)
|
||||
while (endLineNum < mLineCoords.Count - 2)
|
||||
{
|
||||
if (GetLineHeight(endLineNum + 1) > 0.1f)
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue