mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-15 14:54:09 +02:00
Merge pull request #2270 from kallisto56/master
Fixed `FixIt` pasting in wrong place
This commit is contained in:
commit
66923e6720
1 changed files with 5 additions and 4 deletions
|
@ -2796,7 +2796,7 @@ namespace IDE.ui
|
||||||
|
|
||||||
var targetSourceEditWidgetContent = mTargetEditWidget.Content as SourceEditWidgetContent;
|
var targetSourceEditWidgetContent = mTargetEditWidget.Content as SourceEditWidgetContent;
|
||||||
var sourceEditWidgetContent = targetSourceEditWidgetContent;
|
var sourceEditWidgetContent = targetSourceEditWidgetContent;
|
||||||
var prevCursorPosition = sourceEditWidgetContent.mTextCursors.Front.mCursorTextPos;
|
var prevCursorPosition = sourceEditWidgetContent.CursorTextPos;
|
||||||
var prevScrollPos = mTargetEditWidget.mVertPos.mDest;
|
var prevScrollPos = mTargetEditWidget.mVertPos.mDest;
|
||||||
|
|
||||||
UndoBatchStart undoBatchStart = null;
|
UndoBatchStart undoBatchStart = null;
|
||||||
|
@ -2877,7 +2877,7 @@ namespace IDE.ui
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceEditWidgetContent.mTextCursors.Front.mCursorTextPos = fixitIdx;
|
sourceEditWidgetContent.CursorTextPos = fixitIdx;
|
||||||
if (focusChange)
|
if (focusChange)
|
||||||
sourceEditWidgetContent.EnsureCursorVisible(true, true);
|
sourceEditWidgetContent.EnsureCursorVisible(true, true);
|
||||||
|
|
||||||
|
@ -2894,7 +2894,7 @@ namespace IDE.ui
|
||||||
else
|
else
|
||||||
InsertImplText(sourceEditWidgetContent, fixitInsert);
|
InsertImplText(sourceEditWidgetContent, fixitInsert);
|
||||||
|
|
||||||
fixitIdx = (.)sourceEditWidgetContent.mTextCursors.Front.mCursorTextPos;
|
fixitIdx = (.)sourceEditWidgetContent.CursorTextPos;
|
||||||
insertCount++;
|
insertCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2902,9 +2902,10 @@ namespace IDE.ui
|
||||||
if (!focusChange)
|
if (!focusChange)
|
||||||
{
|
{
|
||||||
mTargetEditWidget.VertScrollTo(prevScrollPos, true);
|
mTargetEditWidget.VertScrollTo(prevScrollPos, true);
|
||||||
sourceEditWidgetContent.mTextCursors.Front.mCursorTextPos = prevCursorPosition;
|
sourceEditWidgetContent.CursorTextPos = prevCursorPosition;
|
||||||
int addedSize = sourceEditWidgetContent.mData.mTextLength - prevTextLength;
|
int addedSize = sourceEditWidgetContent.mData.mTextLength - prevTextLength;
|
||||||
sourceEditWidgetContent.[Friend]AdjustCursorsAfterExternalEdit(fixitIdx, addedSize, 0);
|
sourceEditWidgetContent.[Friend]AdjustCursorsAfterExternalEdit(fixitIdx, addedSize, 0);
|
||||||
|
sourceEditWidgetContent.CurCursorTextPos += (int32)addedSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (historyEntry != null)
|
if (historyEntry != null)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue