progress
This commit is contained in:
parent
dd7b7a4b8f
commit
f0782d41a9
10
src/draw.c
10
src/draw.c
@ -48,12 +48,22 @@ void refresh_screen(void)
|
|||||||
void draw_file_buffer(void)
|
void draw_file_buffer(void)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
|
size_t tmp_len;
|
||||||
|
|
||||||
|
char* working_line;
|
||||||
|
char* tmp_line;
|
||||||
|
|
||||||
// reserve the last line for info
|
// reserve the last line for info
|
||||||
for (i = editor.row_offset; i < editor.num_rows && i < (editor.screen_rows + editor.row_offset - 1); i++) {
|
for (i = editor.row_offset; i < editor.num_rows && i < (editor.screen_rows + editor.row_offset - 1); i++) {
|
||||||
|
if (editor.rows[i].len <= editor.screen_cols) {
|
||||||
screen_buffer_append(CLEAR_LINE_STR, CLEAR_LINE_STR_LEN); // clear line first to prevent flickering issues
|
screen_buffer_append(CLEAR_LINE_STR, CLEAR_LINE_STR_LEN); // clear line first to prevent flickering issues
|
||||||
screen_buffer_append(editor.rows[i].line, editor.rows[i].len);
|
screen_buffer_append(editor.rows[i].line, editor.rows[i].len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// want to do line splitting here
|
||||||
|
// mimick vim in which we split the overflow line to the next below
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void draw_editor_rows(void)
|
void draw_editor_rows(void)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user