File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,10 @@ public void Record(StringBuilder buffer)
60
60
/// <param name="count"></param>
61
61
public void Record ( StringBuilder buffer , int offset , int count )
62
62
{
63
- System . Diagnostics . Debug . Assert ( offset >= 0 && offset < buffer . Length ) ;
63
+ System . Diagnostics . Debug . Assert (
64
+ offset >= 0 &&
65
+ ( buffer . Length == 0 || offset < buffer . Length )
66
+ ) ;
64
67
System . Diagnostics . Debug . Assert ( offset + count <= buffer . Length ) ;
65
68
66
69
HasLinewiseText = false ;
Original file line number Diff line number Diff line change @@ -189,6 +189,16 @@ public void ViPasteAfterDeleteWord()
189
189
) ) ;
190
190
}
191
191
192
+ [ SkippableFact ( ) ]
193
+ public void ViDeleteLine_EmptyBuffer_Defect1197 ( )
194
+ {
195
+ TestSetup ( KeyMode . Vi ) ;
196
+
197
+ Test ( "" , Keys (
198
+ _ . Escape , "dd" , CheckThat ( ( ) => AssertLineIs ( "" ) )
199
+ ) ) ;
200
+ }
201
+
192
202
[ SkippableFact ]
193
203
public void ViPasteAfterDeleteLine ( )
194
204
{
You can’t perform that action at this time.
0 commit comments