Editing a .cs file, this comment below has a blank line above it, and a blank line below it; it starts in column 17.
// debug junk
// aaa bbbb ccccc
// dddd eeee ffff
If I put the cursor on 'j' and press Backspace (CUA emulation), I get this;
// debugjunk aaa bbbb ccccc
// dddd eeee ffff
With the cursor still on 'j', I press enter and get this:
// debug
// junk aaa bbbb ccccc dddd eeee ffff
Back to the original, with some more context. Put the cursor after the last 'f', press enter, a new comment line appears as expected.
//----------------------
// TESTING
//----------------------
if (fiTest.Length < 1 && (fiTest.Length != fiGold.Length)) {
// Debugging junk
// System.Diagnostics.Debug.WriteLine("0-length test file");
// throw new Exception("0-length test file");
// debug junk
// aaa bbbb ccccc
// dddd eeee ffff
//
return false;
}
//--------------------------
// End testing
//--------------------------
char[] testHeader = new char[fileLength];
using (StreamReader testReader = new System.IO.StreamReader(@testFile))
{
testReader.BaseStream.Seek(0,System.IO.SeekOrigin.Begin);
testReader.Read(testHeader,0,fileLength);
}
Cursor is one space past last comment char; press Backspace.
//----------------------
// TESTING
//----------------------
if (fiTest.Length < 1 && (fiTest.Length != fiGold.Length)) {
// Debugging junk
// System.Diagnostics.Debug.WriteLine("0-length test file");
// throw new Exception("0-length test file");
// debug junk
// aaa bbbb ccccc
// dddd eeee ffff
return false;
}
//--------------------------
// End testing
//--------------------------
char[] testHeader = new char[fileLength];
using (StreamReader testReader = new System.IO.StreamReader(@testFile)){ //
testReader.BaseStream.Seek(0,System.IO.SeekOrigin.Begin);
testReader.Read(testHeader,0,fileLength);
}
Comment characters are removed (but not the line), and the cursor ends up on the 't' in testReader in the using statment.