move var decl to top of function.

This commit is contained in:
2025-11-26 17:57:59 -08:00
parent 87272a669b
commit 3800751bcf

4
main.c
View File

@@ -1417,6 +1417,7 @@ deletech(uint8_t op)
{ {
struct erow *row = NULL; struct erow *row = NULL;
unsigned char dch = 0; unsigned char dch = 0;
int prev = 0;
if (editor.cury >= editor.nrows) { if (editor.cury >= editor.nrows) {
return; return;
@@ -1441,7 +1442,8 @@ deletech(uint8_t op)
row_append_row(&editor.row[editor.cury - 1], row_append_row(&editor.row[editor.cury - 1],
row->line, row->line,
row->size); row->size);
int prev = editor.no_kill;
prev = editor.no_kill;
editor.no_kill = 1; editor.no_kill = 1;
delete_row(editor.cury); delete_row(editor.cury);