X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=inject.c;h=f9f40e886aee87749ea0a203e7cadb28dfeacfd8;hb=7ea77f37c3d2ad6f176182e2b1441dd33e39af8c;hp=9d3c431758b8cc054c4e773bcb6384769a8db3c0;hpb=1d26603be3c785ed147834cb7c750454a5866599;p=apps%2Fmadtty.git diff --git a/inject.c b/inject.c index 9d3c431..f9f40e8 100644 --- a/inject.c +++ b/inject.c @@ -75,17 +75,17 @@ static void cursor_line_up(RoteTerm *rt) { } static inline void put_normal_char(RoteTerm *rt, char c) { + if (rt->ccol >= rt->cols) { + rt->ccol = 0; + cursor_line_down(rt); + } + rt->cells[rt->crow][rt->ccol].ch = c; rt->cells[rt->crow][rt->ccol].attr = rt->curattr; rt->ccol++; rt->line_dirty[rt->crow] = true; rt->curpos_dirty = true; - - if (rt->ccol >= rt->cols) { - rt->ccol = 0; - cursor_line_down(rt); - } } static inline void put_graphmode_char(RoteTerm *rt, char c) {