now only writing buffer render items if they fall in the clip range of the view.
This commit is contained in:
parent
1e8bea250e
commit
33407c2258
|
@ -4898,6 +4898,7 @@ draw_file_loaded(View *view, i32_Rect rect, b32 is_active, Render_Target *target
|
|||
Style *style = main_style(models);
|
||||
i32 line_height = view->line_height;
|
||||
|
||||
f32 clip_w = view_width(view);
|
||||
f32 max_x = view_file_display_width(view);
|
||||
i32 max_y = rect.y1 - rect.y0 + line_height;
|
||||
|
||||
|
@ -4946,8 +4947,8 @@ draw_file_loaded(View *view, i32_Rect rect, b32 is_active, Render_Target *target
|
|||
view->edit_pos->scroll_i = render_cursor.pos;
|
||||
|
||||
buffer_get_render_data(&file->state.buffer, items, max, &count,
|
||||
(f32)rect.x0, (f32)rect.y0, max_x, (f32)max_y,
|
||||
scroll_x, scroll_y,
|
||||
(f32)rect.x0, (f32)rect.y0, clip_w,
|
||||
scroll_x, scroll_y, max_x, (f32)max_y,
|
||||
render_cursor, !view->file_data.unwrapped_lines,
|
||||
advance_data, (f32)line_height);
|
||||
}
|
||||
|
|
1
TODO.txt
1
TODO.txt
|
@ -142,6 +142,7 @@
|
|||
; [] more built in options for auto indenting
|
||||
;
|
||||
; [X] eliminate the need for the lexer state's spare array.
|
||||
; [X] fix buffer render item capacity issue
|
||||
|
||||
; Arbitrary wrap positions
|
||||
; [X] allow for arbitrary wrap positions independent of view width
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue