aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/CellBuffer.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2002-04-26 01:44:11 +0000
committernyamatongwe <unknown>2002-04-26 01:44:11 +0000
commit6807125f2ba42c9105b7405096edf949ae019789 (patch)
tree854230bb96405522ac05ee71370f16dd33cd8d9e /src/CellBuffer.cxx
parent10980e15da41ac11df7139eee84845c1530404d0 (diff)
downloadscintilla-mirror-6807125f2ba42c9105b7405096edf949ae019789.tar.gz
Fixed bug when handling removal of '\n' following '\r'.
Diffstat (limited to 'src/CellBuffer.cxx')
-rw-r--r--src/CellBuffer.cxx11
1 files changed, 7 insertions, 4 deletions
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;