1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-07-04 23:36:00 +02:00

Fixed line paste indent issues

This commit is contained in:
Brian Fiete 2020-10-17 06:46:16 -07:00
parent a700a6bbd2
commit 2a57d9d447
2 changed files with 36 additions and 24 deletions

View file

@ -2054,6 +2054,8 @@ namespace Beefy.widgets
CursorLineAndColumn = .(origPosition.mLine, 0);
var lineStartPosition = CursorLineAndColumn;
InsertAtCursor("\n");
if (var insertTextAction = mData.mUndoManager.GetLastUndoAction() as InsertTextAction)
insertTextAction.mVirtualCursorPos = origPosition;
CursorLineAndColumn = lineStartPosition;
CursorToLineStart(false);
@ -2071,7 +2073,7 @@ namespace Beefy.widgets
}
PasteText(text);
CursorLineAndColumn = origPosition;
CursorLineAndColumn = .(origPosition.mLine + 1, origPosition.mColumn);
mData.mUndoManager.Add(undoBatchStart.mBatchEnd);
}
else