Skip to content

Commit

Permalink
next: Step 103
Browse files Browse the repository at this point in the history
  • Loading branch information
Gurrium committed Jan 17, 2023
1 parent d19c3a6 commit a8107d6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions kilo.c
Expand Up @@ -248,6 +248,17 @@ void editorRowInsertChar(erow *row, int at, int c) {
editorUpdateRow(row);
}

/*** editor operations ***/

void editorInsertChar(int c) {
if (E.cy == E.numrows) {
editorAppendRow("", 0);
}

editorRowInsertChar(&E.row[E.cy], E.cx, c);
E.cx++;
}

/*** file i/o ***/

void editorOpen(char *filename) {
Expand Down

0 comments on commit a8107d6

Please sign in to comment.