diff --git a/C++ProjectTemplate.wasm b/C++ProjectTemplate.wasm index 4797be0..b26c253 100755 Binary files a/C++ProjectTemplate.wasm and b/C++ProjectTemplate.wasm differ diff --git a/main.cpp b/main.cpp index 0da8662..0bf1d7d 100644 --- a/main.cpp +++ b/main.cpp @@ -110,12 +110,22 @@ public: void GetAnyKeyPress(olc::Key k)override{ lastBlinkTime=0.5f; + if (k==DEL){ + if (cursors[0].pos==document[cursors[0].line].size()){ + if (cursors[0].line0){ cursors[0].pos=document[cursors[0].line-1].size(); document[cursors[0].line-1].append(document[cursors[0].line]); - document[cursors[0].line--].clear(); + document.erase(document.begin()+cursors[0].line--); } } else { document[cursors[0].line].erase(cursors[0].pos---1,1);