From 012b22b1c19ed8c2dab2ba9062af243f4d0177d6 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 26 Apr 2002 01:44:11 +0000 Subject: Fixed bug when handling removal of '\n' following '\r'. --- src/CellBuffer.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx index ecb5bc180..b67da81c9 100644 --- a/src/CellBuffer.cxx +++ b/src/CellBuffer.cxx @@ -958,10 +958,13 @@ void CellBuffer::BasicDeleteChars(int position, int deleteLength) { //Platform::DebugPrintf("Removing cr end of line\n"); lv.Remove(lineRemove); } - } else if ((ch == '\n') && !ignoreNL) { - //Platform::DebugPrintf("Removing lf end of line\n"); - lv.Remove(lineRemove); - ignoreNL = false; // Further \n are not real deletions + } else if (ch == '\n') { + if (ignoreNL) { + ignoreNL = false; // Further \n are real deletions + } else { + //Platform::DebugPrintf("Removing lf end of line\n"); + lv.Remove(lineRemove); + } } ch = chNext; -- cgit v1.2.3