Add search function
Build project / build (push) Has been cancelled

This commit is contained in:
arthur
2025-11-03 16:45:23 +01:00
parent 6a201b3ebc
commit 419e924650
8 changed files with 44 additions and 2 deletions
+12
View File
@@ -18,6 +18,18 @@ int editorRowCxToRx(erow *row, int cursor_x) {
return render_x;
}
int editorRowRxToCx(erow *row, int rx) {
int cur_rx = 0;
int cx;
for (cx = 0; cx < row->size; cx++) {
if (row->chars[cx] == '\t')
cur_rx += (E.constantes.TAB_LENGTH - 1) - (cur_rx % E.constantes.TAB_LENGTH);
cur_rx++;
if (cur_rx > rx) return cx;
}
return cx;
}
/**
* \fn editorUpdateRow(erow *row)
* \brief Copy content of \p row in \p row->render.