/* console cells */
struct kmscon_buffer *cells;
bool rel_addr; /* is relative addressing used? */
- bool auto_wrap; /* auto wrap on end of line? */
/* cursor */
unsigned int cursor_x;
memset(con, 0, sizeof(*con));
con->ref = 1;
- con->auto_wrap = true;
ret = kmscon_buffer_new(&con->cells, 0, 0);
if (ret)
last = con->cells->scroll_y + con->cells->mtop_y;
if (con->cursor_x >= con->cells->size_x) {
- if (con->auto_wrap) {
+ if (flags & KMSCON_CONSOLE_WRAP) {
con->cursor_x = 0;
con->cursor_y++;
if (con->cursor_y >= last) {
/* console objects */
#define KMSCON_CONSOLE_INSERT 0x01
+#define KMSCON_CONSOLE_WRAP 0x02
int kmscon_console_new(struct kmscon_console **out);
void kmscon_console_ref(struct kmscon_console *con);
flags = 0;
if (vte->flags & FLAG_INSERT_REPLACE_MODE)
flags |= KMSCON_CONSOLE_INSERT;
+ if (vte->flags & FLAG_AUTO_WRAP_MODE)
+ flags |= KMSCON_CONSOLE_WRAP;
kmscon_console_write(vte->con, sym, &vte->cattr, flags);
}
vte->flags |= FLAG_TEXT_CURSOR_MODE;
vte->flags |= FLAG_AUTO_REPEAT_MODE;
vte->flags |= FLAG_SEND_RECEIVE_MODE;
+ vte->flags |= FLAG_AUTO_WRAP_MODE;
kmscon_utf8_mach_reset(vte->mach);
vte->state = STATE_GROUND;