|
@@ -4500,12 +4500,12 @@ public class TextView : View
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
- _historyText.Add (new List<List<RuneCell>> { new (currentLine) }, CursorPosition);
|
|
|
|
|
|
+ _historyText.Add ([[..currentLine]], CursorPosition);
|
|
|
|
|
|
currentLine.RemoveAt (CurrentColumn);
|
|
currentLine.RemoveAt (CurrentColumn);
|
|
|
|
|
|
_historyText.Add (
|
|
_historyText.Add (
|
|
- new List<List<RuneCell>> { new (currentLine) },
|
|
|
|
|
|
+ [[..currentLine]],
|
|
CursorPosition,
|
|
CursorPosition,
|
|
HistoryText.LineStatus.Replaced
|
|
HistoryText.LineStatus.Replaced
|
|
);
|
|
);
|
|
@@ -5070,7 +5070,7 @@ public class TextView : View
|
|
}
|
|
}
|
|
|
|
|
|
_historyText.Add (
|
|
_historyText.Add (
|
|
- new List<List<RuneCell>> { new (GetCurrentLine ()) },
|
|
|
|
|
|
+ [[..GetCurrentLine ()]],
|
|
CursorPosition,
|
|
CursorPosition,
|
|
HistoryText.LineStatus.Replaced
|
|
HistoryText.LineStatus.Replaced
|
|
);
|
|
);
|
|
@@ -5110,7 +5110,7 @@ public class TextView : View
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- _historyText.Add (new List<List<RuneCell>> { new (currentLine) }, CursorPosition);
|
|
|
|
|
|
+ _historyText.Add ([[..currentLine]], CursorPosition);
|
|
|
|
|
|
if (currentLine.Count == 0)
|
|
if (currentLine.Count == 0)
|
|
{
|
|
{
|
|
@@ -5141,12 +5141,14 @@ public class TextView : View
|
|
CurrentRow--;
|
|
CurrentRow--;
|
|
currentLine = _model.GetLine (CurrentRow);
|
|
currentLine = _model.GetLine (CurrentRow);
|
|
|
|
|
|
- List<List<RuneCell>> removedLine = new () { new List<RuneCell> (currentLine) };
|
|
|
|
-
|
|
|
|
- removedLine.Add (new List<RuneCell> ());
|
|
|
|
|
|
+ List<List<RuneCell>> removedLine =
|
|
|
|
+ [
|
|
|
|
+ [..currentLine],
|
|
|
|
+ []
|
|
|
|
+ ];
|
|
|
|
|
|
_historyText.Add (
|
|
_historyText.Add (
|
|
- new List<List<RuneCell>> (removedLine),
|
|
|
|
|
|
+ [..removedLine],
|
|
CursorPosition,
|
|
CursorPosition,
|
|
HistoryText.LineStatus.Removed
|
|
HistoryText.LineStatus.Removed
|
|
);
|
|
);
|
|
@@ -5175,7 +5177,7 @@ public class TextView : View
|
|
}
|
|
}
|
|
|
|
|
|
_historyText.Add (
|
|
_historyText.Add (
|
|
- new List<List<RuneCell>> { new (GetCurrentLine ()) },
|
|
|
|
|
|
+ [[..GetCurrentLine ()]],
|
|
CursorPosition,
|
|
CursorPosition,
|
|
HistoryText.LineStatus.Replaced
|
|
HistoryText.LineStatus.Replaced
|
|
);
|
|
);
|
|
@@ -5199,14 +5201,14 @@ public class TextView : View
|
|
|
|
|
|
List<RuneCell> currentLine = GetCurrentLine ();
|
|
List<RuneCell> currentLine = GetCurrentLine ();
|
|
|
|
|
|
- _historyText.Add (new List<List<RuneCell>> { new (GetCurrentLine ()) }, CursorPosition);
|
|
|
|
|
|
+ _historyText.Add ([[..GetCurrentLine ()]], CursorPosition);
|
|
|
|
|
|
if (CurrentColumn == 0)
|
|
if (CurrentColumn == 0)
|
|
{
|
|
{
|
|
DeleteTextBackwards ();
|
|
DeleteTextBackwards ();
|
|
|
|
|
|
_historyText.ReplaceLast (
|
|
_historyText.ReplaceLast (
|
|
- new List<List<RuneCell>> { new (GetCurrentLine ()) },
|
|
|
|
|
|
+ [[..GetCurrentLine ()]],
|
|
CursorPosition,
|
|
CursorPosition,
|
|
HistoryText.LineStatus.Replaced
|
|
HistoryText.LineStatus.Replaced
|
|
);
|
|
);
|
|
@@ -5245,7 +5247,7 @@ public class TextView : View
|
|
}
|
|
}
|
|
|
|
|
|
_historyText.Add (
|
|
_historyText.Add (
|
|
- new List<List<RuneCell>> { new (GetCurrentLine ()) },
|
|
|
|
|
|
+ [[..GetCurrentLine ()]],
|
|
CursorPosition,
|
|
CursorPosition,
|
|
HistoryText.LineStatus.Replaced
|
|
HistoryText.LineStatus.Replaced
|
|
);
|
|
);
|
|
@@ -5267,14 +5269,14 @@ public class TextView : View
|
|
|
|
|
|
List<RuneCell> currentLine = GetCurrentLine ();
|
|
List<RuneCell> currentLine = GetCurrentLine ();
|
|
|
|
|
|
- _historyText.Add (new List<List<RuneCell>> { new (GetCurrentLine ()) }, CursorPosition);
|
|
|
|
|
|
+ _historyText.Add ([[..GetCurrentLine ()]], CursorPosition);
|
|
|
|
|
|
if (currentLine.Count == 0 || CurrentColumn == currentLine.Count)
|
|
if (currentLine.Count == 0 || CurrentColumn == currentLine.Count)
|
|
{
|
|
{
|
|
DeleteTextForwards ();
|
|
DeleteTextForwards ();
|
|
|
|
|
|
_historyText.ReplaceLast (
|
|
_historyText.ReplaceLast (
|
|
- new List<List<RuneCell>> { new (GetCurrentLine ()) },
|
|
|
|
|
|
+ [[..GetCurrentLine ()]],
|
|
CursorPosition,
|
|
CursorPosition,
|
|
HistoryText.LineStatus.Replaced
|
|
HistoryText.LineStatus.Replaced
|
|
);
|
|
);
|
|
@@ -5304,7 +5306,7 @@ public class TextView : View
|
|
}
|
|
}
|
|
|
|
|
|
_historyText.Add (
|
|
_historyText.Add (
|
|
- new List<List<RuneCell>> { new (GetCurrentLine ()) },
|
|
|
|
|
|
+ [[..GetCurrentLine ()]],
|
|
CursorPosition,
|
|
CursorPosition,
|
|
HistoryText.LineStatus.Replaced
|
|
HistoryText.LineStatus.Replaced
|
|
);
|
|
);
|