This repository was archived by the owner on Feb 26, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -358,7 +358,7 @@ private void RemoveText(bool ControlIsPressed = false)
358358 if ( curLine . Length > 0 )
359359 TotalLines . String_AddToEnd ( CursorPosition . LineNumber - 1 , curLine ) ;
360360
361- TotalLines . RemoveAt ( CursorPosition . LineNumber ) ;
361+ TotalLines . DeleteAt ( CursorPosition . LineNumber ) ;
362362
363363 //update the cursorposition
364364 CursorPosition . LineNumber -= 1 ;
@@ -399,15 +399,9 @@ private void DeleteText(bool ControlIsPressed = false)
399399
400400 undoRedo . RecordUndoAction ( ( ) =>
401401 {
402- int curpos = TotalLines . GetLineLength ( CursorPosition . LineNumber - 1 ) ;
403-
404- //line still has text
405- if ( curLine . Length > 0 )
406- TotalLines . String_AddToEnd ( CursorPosition . LineNumber , LineToAdd ) ;
407- else //line has no text
408- CursorPosition . LineNumber -= 1 ;
409-
410- TotalLines . RemoveAt ( CursorPosition . LineNumber + 1 ) ;
402+ int curpos = TotalLines . GetLineLength ( CursorPosition . LineNumber ) ;
403+ CurrentLine += LineToAdd ;
404+ TotalLines . DeleteAt ( CursorPosition . LineNumber + 1 ) ;
411405
412406 //update the cursorposition
413407 CursorPosition . CharacterPosition = curpos ;
You can’t perform that action at this time.
0 commit comments