...
This commit is contained in:
parent
0a158f3577
commit
99d1eec021
2 changed files with 6 additions and 0 deletions
|
|
@ -148,6 +148,9 @@ linebuf_init_line(LineBuf *self, index_type idx) {
|
|||
|
||||
void
|
||||
linebuf_clear_lines(LineBuf *self, const Cursor *cursor, index_type start, index_type end) {
|
||||
#if BLANK_CHAR != 0
|
||||
#error This implementation is incorrect for BLANK_CHAR != 0
|
||||
#endif
|
||||
GPUCell *first_gpu_line = gpu_lineptr(self, start);
|
||||
GPUCell gc = cursor_as_gpu_cell(cursor);
|
||||
for (index_type i = 0; i < self->xnum; i++) memcpy(first_gpu_line + i, &gc, sizeof(gc));
|
||||
|
|
|
|||
|
|
@ -542,6 +542,9 @@ void
|
|||
line_apply_cursor(Line *self, const Cursor *cursor, unsigned int at, unsigned int num, bool clear_char) {
|
||||
GPUCell gc = cursor_as_gpu_cell(cursor);
|
||||
if (clear_char) {
|
||||
#if BLANK_CHAR != 0
|
||||
#error This implementation is incorrect for BLANK_CHAR != 0
|
||||
#endif
|
||||
for (index_type i = at; i < self->xnum && i < at + num; i++) {
|
||||
memset(self->cpu_cells + i, 0, sizeof(self->cpu_cells[0]));
|
||||
memcpy(self->gpu_cells + i, &gc, sizeof(gc));
|
||||
|
|
|
|||
Loading…
Reference in a new issue