@@ -221,9 +221,9 @@ public static void DeleteToEnd(ConsoleKeyInfo? key = null, object arg = null)
221221 return ;
222222 }
223223
224- _singleton . _clipboard = _singleton . _buffer . ToString ( _singleton . _current , _singleton . _buffer . Length - _singleton . _current ) ;
224+ _clipboard . Record ( _singleton . _buffer , _singleton . _current , _singleton . _buffer . Length - _singleton . _current ) ;
225225 _singleton . SaveEditItem ( EditItemDelete . Create (
226- _singleton . _clipboard ,
226+ _clipboard ,
227227 _singleton . _current ,
228228 DeleteToEnd ,
229229 arg
@@ -258,7 +258,7 @@ private static void DeleteToEndPoint(object arg, int endPoint, Action<ConsoleKey
258258 {
259259 _singleton . SaveToClipboard ( _singleton . _current , endPoint - _singleton . _current ) ;
260260 _singleton . SaveEditItem ( EditItemDelete . Create (
261- _singleton . _clipboard ,
261+ _clipboard ,
262262 _singleton . _current ,
263263 instigator ,
264264 arg
@@ -277,7 +277,7 @@ private static void DeleteBackwardToEndPoint(object arg, int endPoint, Action<Co
277277
278278 _singleton . SaveToClipboard ( endPoint , deleteLength ) ;
279279 _singleton . SaveEditItem ( EditItemDelete . Create (
280- _singleton . _clipboard ,
280+ _clipboard ,
281281 endPoint ,
282282 instigator ,
283283 arg
@@ -302,7 +302,7 @@ public static void ViDeleteGlob(ConsoleKeyInfo? key = null, object arg = null)
302302
303303 _singleton . SaveToClipboard ( _singleton . _current , length ) ;
304304 _singleton . SaveEditItem ( EditItemDelete . Create (
305- _singleton . _clipboard ,
305+ _clipboard ,
306306 _singleton . _current ,
307307 ViDeleteGlob ,
308308 arg
@@ -334,7 +334,7 @@ public static void DeleteEndOfWord(ConsoleKeyInfo? key = null, object arg = null
334334 }
335335 _singleton . SaveToClipboard ( _singleton . _current , 1 + endPoint - _singleton . _current ) ;
336336 _singleton . SaveEditItem ( EditItemDelete . Create (
337- _singleton . _clipboard ,
337+ _clipboard ,
338338 _singleton . _current ,
339339 DeleteEndOfWord ,
340340 arg
@@ -361,7 +361,7 @@ public static void ViDeleteEndOfGlob(ConsoleKeyInfo? key = null, object arg = nu
361361
362362 _singleton . SaveToClipboard ( _singleton . _current , 1 + endPoint - _singleton . _current ) ;
363363 _singleton . SaveEditItem ( EditItemDelete . Create (
364- _singleton . _clipboard ,
364+ _clipboard ,
365365 _singleton . _current ,
366366 ViDeleteEndOfGlob ,
367367 arg
@@ -706,7 +706,7 @@ public static void DeleteLineToFirstChar(ConsoleKeyInfo? key = null, object arg
706706 }
707707
708708 _singleton . SaveToClipboard ( i , _singleton . _current - i ) ;
709- _singleton . SaveEditItem ( EditItemDelete . Create ( _singleton . _clipboard , i , DeleteLineToFirstChar ) ) ;
709+ _singleton . SaveEditItem ( EditItemDelete . Create ( _clipboard , i , DeleteLineToFirstChar ) ) ;
710710
711711 _singleton . _buffer . Remove ( i , _singleton . _current - i ) ;
712712 _singleton . _current = i ;
@@ -723,8 +723,8 @@ public static void DeleteLineToFirstChar(ConsoleKeyInfo? key = null, object arg
723723 /// </summary>
724724 public static void DeleteLine ( ConsoleKeyInfo ? key = null , object arg = null )
725725 {
726- _singleton . _clipboard = _singleton . _buffer . ToString ( ) ;
727- _singleton . SaveEditItem ( EditItemDelete . Create ( _singleton . _clipboard , 0 ) ) ;
726+ _clipboard . Record ( _singleton . _buffer ) ;
727+ _singleton . SaveEditItem ( EditItemDelete . Create ( _clipboard , 0 ) ) ;
728728 _singleton . _current = 0 ;
729729 _singleton . _buffer . Remove ( 0 , _singleton . _buffer . Length ) ;
730730 _singleton . Render ( ) ;
@@ -746,9 +746,9 @@ public static void BackwardDeleteWord(ConsoleKeyInfo? key = null, object arg = n
746746 Ding ( ) ;
747747 return ;
748748 }
749- _singleton . _clipboard = _singleton . _buffer . ToString ( deletePoint , _singleton . _current - deletePoint ) ;
749+ _clipboard . Record ( _singleton . _buffer , deletePoint , _singleton . _current - deletePoint ) ;
750750 _singleton . SaveEditItem ( EditItemDelete . Create (
751- _singleton . _clipboard ,
751+ _clipboard ,
752752 deletePoint ,
753753 BackwardDeleteWord ,
754754 arg
@@ -779,9 +779,9 @@ public static void ViBackwardDeleteGlob(ConsoleKeyInfo? key = null, object arg =
779779 Ding ( ) ;
780780 return ;
781781 }
782- _singleton . _clipboard = _singleton . _buffer . ToString ( deletePoint , _singleton . _current - deletePoint ) ;
782+ _clipboard . Record ( _singleton . _buffer , deletePoint , _singleton . _current - deletePoint ) ;
783783 _singleton . SaveEditItem ( EditItemDelete . Create (
784- _singleton . _clipboard ,
784+ _clipboard ,
785785 deletePoint ,
786786 BackwardDeleteWord ,
787787 arg
@@ -823,7 +823,7 @@ private static void DeleteRange(int first, int last, Action<ConsoleKeyInfo?, obj
823823 int length = last - first + 1 ;
824824
825825 _singleton . SaveToClipboard ( first , length ) ;
826- _singleton . SaveEditItem ( EditItemDelete . Create ( _singleton . _clipboard , first , action ) ) ;
826+ _singleton . SaveEditItem ( EditItemDelete . Create ( _clipboard , first , action ) ) ;
827827 _singleton . _current = first ;
828828 _singleton . _buffer . Remove ( first , length ) ;
829829 _singleton . Render ( ) ;
0 commit comments