fix a bug in kilo

Submitted upstream at https://github.com/antirez/kilo/pull/81.
This commit is contained in:
Kartik K. Agaram 2022-02-03 17:48:01 -08:00
parent a8dfea1d3c
commit 02104952d2
1 changed files with 1 additions and 1 deletions

View File

@ -441,7 +441,7 @@ static void editorDelRow(int at) {
row = E.row+at;
editorFreeRow(row);
memmove(E.row+at,E.row+at+1,sizeof(E.row[0])*(E.numrows-at-1));
for (int j = at; j < E.numrows-1; j++) E.row[j].idx++;
for (int j = at; j < E.numrows-1; j++) E.row[j].idx--;
E.numrows--;
E.dirty++;
}