diff --git a/src/main.cpp b/src/main.cpp index 3ccd849..0ed7e0f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -226,6 +226,24 @@ int main(int argc, char** argv) { lines = undoHistory[undos].lines; pos = undoHistory[undos].pos; break; + case 'a': + currMode = mode::INSERT; + if (!(pos.x + 1 > lines[pos.y].size())) { + pos.x ++; + } + break; + case 'o': + currMode = mode::INSERT; + { + size_t line_idx = pos.y - 1; + if (line_idx < lines.size()) { + lines.insert(lines.begin() + line_idx + 1, ""); + pos.y++; + pos.x = 0; + if (!fileChanged) fileChanged = true; + } + } + break; case 'h': case KEY_LEFT: if (pos.x > 0) {