mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Merge pull request #2249 from kallisto56/master
Fix: `PasteText()` one-to-many
This commit is contained in:
commit
dd2e5a25c5
1 changed files with 2 additions and 7 deletions
|
@ -2625,7 +2625,7 @@ namespace Beefy.widgets
|
||||||
}
|
}
|
||||||
|
|
||||||
// Case, when we have multiple cursors
|
// Case, when we have multiple cursors
|
||||||
var identicalCountOfCusrors = ((mTextCursors.Count == fragments.Count) || (mTextCursors.Count == 1 && fragments.Count == 0));
|
var identicalCountOfCursors = ((mTextCursors.Count == fragments.Count) || (mTextCursors.Count == 1 && fragments.Count == 0));
|
||||||
var sortedCursors = GetSortedCursors(.. scope List<TextCursor>());
|
var sortedCursors = GetSortedCursors(.. scope List<TextCursor>());
|
||||||
var idx = sortedCursors.Count-1;
|
var idx = sortedCursors.Count-1;
|
||||||
|
|
||||||
|
@ -2634,11 +2634,6 @@ namespace Beefy.widgets
|
||||||
if (sortedCursors.Count == 1)
|
if (sortedCursors.Count == 1)
|
||||||
undoBatchStart = mData.mUndoManager.Add(.. new UndoBatchStart("paste"));
|
undoBatchStart = mData.mUndoManager.Add(.. new UndoBatchStart("paste"));
|
||||||
|
|
||||||
if (!identicalCountOfCusrors)
|
|
||||||
{
|
|
||||||
text.RemoveFromEnd(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (var cursor in sortedCursors.Reversed)
|
for (var cursor in sortedCursors.Reversed)
|
||||||
{
|
{
|
||||||
SetTextCursor(cursor);
|
SetTextCursor(cursor);
|
||||||
|
@ -2648,7 +2643,7 @@ namespace Beefy.widgets
|
||||||
PasteFragment(text, extra);
|
PasteFragment(text, extra);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (!identicalCountOfCusrors)
|
else if (!identicalCountOfCursors)
|
||||||
{
|
{
|
||||||
PasteFragment(text, fragments[0].mExtra);
|
PasteFragment(text, fragments[0].mExtra);
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue