X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=madtty%2Finject_csi.h;fp=madtty%2Finject_csi.h;h=5c47efb1f822cb627e129ed7c3f3bd9ab036169e;hb=8ead06c97e16165208fd9d02ada73d63aeca11f2;hp=3759934657886489e2eaeb5223f36c0278566d5b;hpb=7bbe8b9e43d79660594f369b25a1640799e9612d;p=apps%2Fmadtty.git diff --git a/madtty/inject_csi.h b/madtty/inject_csi.h index 3759934..5c47efb 100644 --- a/madtty/inject_csi.h +++ b/madtty/inject_csi.h @@ -30,15 +30,16 @@ * related fields in it */ void rote_es_interpret_csi(RoteTerm *rt); -static inline void clamp_cursor_to_bounds(RoteTerm *rt) { - if (rt->crow < 0) rt->curpos_dirty = true, rt->crow = 0; - if (rt->ccol < 0) rt->curpos_dirty = true, rt->ccol = 0; +static inline void clamp_cursor_to_bounds(RoteTerm *rt) +{ + if (rt->crow < 0) rt->curpos_dirty = true, rt->crow = 0; + if (rt->ccol < 0) rt->curpos_dirty = true, rt->ccol = 0; - if (rt->crow >= rt->rows) - rt->curpos_dirty = true, rt->crow = rt->rows - 1; + if (rt->crow >= rt->rows) + rt->curpos_dirty = true, rt->crow = rt->rows - 1; - if (rt->ccol >= rt->cols) - rt->curpos_dirty = true, rt->ccol = rt->cols - 1; + if (rt->ccol >= rt->cols) + rt->curpos_dirty = true, rt->ccol = rt->cols - 1; } #endif