Lines Matching refs:t_cursor
94 teken_assert(t->t_cursor.tp_row <= t->t_winsize.tp_row); in teken_subr_do_scroll()
161 (t->t_cursor.tp_row - t->t_originreg.ts_begin) + 1, in teken_subr_do_cpr()
162 t->t_cursor.tp_col + 1); in teken_subr_do_cpr()
188 t->t_cursor.tp_row = t->t_cursor.tp_col = 0; in teken_subr_alignment_test()
206 if (t->t_cursor.tp_col == 0) { in teken_subr_backspace()
207 if (t->t_cursor.tp_row == t->t_originreg.ts_begin) in teken_subr_backspace()
209 t->t_cursor.tp_row--; in teken_subr_backspace()
210 t->t_cursor.tp_col = t->t_winsize.tp_col - 1; in teken_subr_backspace()
212 t->t_cursor.tp_col--; in teken_subr_backspace()
215 if (t->t_cursor.tp_col == 0) in teken_subr_backspace()
218 t->t_cursor.tp_col--; in teken_subr_backspace()
236 t->t_cursor.tp_col = 0; in teken_subr_carriage_return()
245 if (ncols > t->t_cursor.tp_col) in teken_subr_cursor_backward()
246 t->t_cursor.tp_col = 0; in teken_subr_cursor_backward()
248 t->t_cursor.tp_col -= ncols; in teken_subr_cursor_backward()
259 if (t->t_cursor.tp_col == 0) in teken_subr_cursor_backward_tabulation()
262 t->t_cursor.tp_col--; in teken_subr_cursor_backward_tabulation()
265 if (teken_tab_isset(t, t->t_cursor.tp_col)) in teken_subr_cursor_backward_tabulation()
276 if (t->t_cursor.tp_row + nrows >= t->t_scrollreg.ts_end) in teken_subr_cursor_down()
277 t->t_cursor.tp_row = t->t_scrollreg.ts_end - 1; in teken_subr_cursor_down()
279 t->t_cursor.tp_row += nrows; in teken_subr_cursor_down()
288 if (t->t_cursor.tp_col + ncols >= t->t_winsize.tp_col) in teken_subr_cursor_forward()
289 t->t_cursor.tp_col = t->t_winsize.tp_col - 1; in teken_subr_cursor_forward()
291 t->t_cursor.tp_col += ncols; in teken_subr_cursor_forward()
302 if (t->t_cursor.tp_col == t->t_winsize.tp_col - 1) in teken_subr_cursor_forward_tabulation()
305 t->t_cursor.tp_col++; in teken_subr_cursor_forward_tabulation()
308 if (teken_tab_isset(t, t->t_cursor.tp_col)) in teken_subr_cursor_forward_tabulation()
319 t->t_cursor.tp_col = 0; in teken_subr_cursor_next_line()
328 t->t_cursor.tp_row = row < t->t_originreg.ts_end ? in teken_subr_cursor_position()
332 t->t_cursor.tp_col = col < t->t_winsize.tp_col ? in teken_subr_cursor_position()
356 t->t_cursor.tp_col = 0; in teken_subr_cursor_previous_line()
364 if (t->t_scrollreg.ts_begin + nrows >= t->t_cursor.tp_row) in teken_subr_cursor_up()
365 t->t_cursor.tp_row = t->t_scrollreg.ts_begin; in teken_subr_cursor_up()
367 t->t_cursor.tp_row -= nrows; in teken_subr_cursor_up()
396 tr.tr_begin.tp_row = t->t_cursor.tp_row; in teken_subr_delete_character()
397 tr.tr_end.tp_row = t->t_cursor.tp_row + 1; in teken_subr_delete_character()
400 if (t->t_cursor.tp_col + ncols >= t->t_winsize.tp_col) { in teken_subr_delete_character()
401 tr.tr_begin.tp_col = t->t_cursor.tp_col; in teken_subr_delete_character()
404 tr.tr_begin.tp_col = t->t_cursor.tp_col + ncols; in teken_subr_delete_character()
405 teken_funcs_copy(t, &tr, &t->t_cursor); in teken_subr_delete_character()
420 if (t->t_cursor.tp_row < t->t_scrollreg.ts_begin || in teken_subr_delete_line()
421 t->t_cursor.tp_row >= t->t_scrollreg.ts_end) in teken_subr_delete_line()
428 if (t->t_cursor.tp_row + nrows >= t->t_scrollreg.ts_end) { in teken_subr_delete_line()
429 tr.tr_begin.tp_row = t->t_cursor.tp_row; in teken_subr_delete_line()
434 tr.tr_begin.tp_row = t->t_cursor.tp_row + nrows; in teken_subr_delete_line()
435 tp.tp_row = t->t_cursor.tp_row; in teken_subr_delete_line()
488 tr.tr_begin = t->t_cursor; in teken_subr_erase_character()
489 tr.tr_end.tp_row = t->t_cursor.tp_row + 1; in teken_subr_erase_character()
491 if (t->t_cursor.tp_col + ncols >= t->t_winsize.tp_col) in teken_subr_erase_character()
494 tr.tr_end.tp_col = t->t_cursor.tp_col + ncols; in teken_subr_erase_character()
512 if (t->t_cursor.tp_row == 0) in teken_subr_erase_display()
515 r.tr_end.tp_row = t->t_cursor.tp_row; in teken_subr_erase_display()
525 if (t->t_cursor.tp_row == t->t_winsize.tp_row - 1) in teken_subr_erase_display()
527 r.tr_begin.tp_row = t->t_cursor.tp_row + 1; in teken_subr_erase_display()
540 r.tr_begin.tp_row = t->t_cursor.tp_row; in teken_subr_erase_line()
541 r.tr_end.tp_row = t->t_cursor.tp_row + 1; in teken_subr_erase_line()
546 r.tr_end.tp_col = t->t_cursor.tp_col + 1; in teken_subr_erase_line()
553 r.tr_begin.tp_col = t->t_cursor.tp_col; in teken_subr_erase_line()
608 t->t_cursor.tp_col = col < t->t_winsize.tp_col ? in teken_subr_horizontal_position_absolute()
626 teken_tab_set(t, t->t_cursor.tp_col); in teken_subr_horizontal_tab_set()
633 if (t->t_cursor.tp_row < t->t_scrollreg.ts_end - 1) { in teken_subr_index()
634 t->t_cursor.tp_row++; in teken_subr_index()
647 tr.tr_begin = t->t_cursor; in teken_subr_insert_character()
648 tr.tr_end.tp_row = t->t_cursor.tp_row + 1; in teken_subr_insert_character()
650 if (t->t_cursor.tp_col + ncols >= t->t_winsize.tp_col) { in teken_subr_insert_character()
657 tp.tp_row = t->t_cursor.tp_row; in teken_subr_insert_character()
658 tp.tp_col = t->t_cursor.tp_col + ncols; in teken_subr_insert_character()
661 tr.tr_end.tp_col = t->t_cursor.tp_col + ncols; in teken_subr_insert_character()
674 if (t->t_cursor.tp_row < t->t_scrollreg.ts_begin || in teken_subr_insert_line()
675 t->t_cursor.tp_row >= t->t_scrollreg.ts_end) in teken_subr_insert_line()
678 tr.tr_begin.tp_row = t->t_cursor.tp_row; in teken_subr_insert_line()
682 if (t->t_cursor.tp_row + nrows >= t->t_scrollreg.ts_end) { in teken_subr_insert_line()
689 tp.tp_row = t->t_cursor.tp_row + nrows; in teken_subr_insert_line()
693 tr.tr_end.tp_row = t->t_cursor.tp_row + nrows; in teken_subr_insert_line()
718 t->t_cursor.tp_row++; in teken_subr_newline()
720 if (t->t_cursor.tp_row >= t->t_scrollreg.ts_end) { in teken_subr_newline()
722 t->t_cursor.tp_row = t->t_scrollreg.ts_end - 1; in teken_subr_newline()
744 t->t_cursor.tp_row = t->t_originreg.ts_begin; in teken_subr_newpage()
745 t->t_cursor.tp_col = 0; in teken_subr_newpage()
757 t->t_cursor.tp_col = 0; in teken_subr_next_line()
850 teken_subr_do_putchar(t, &t->t_cursor, c, width); in teken_subr_regular_character()
851 t->t_cursor.tp_col += width; in teken_subr_regular_character()
853 if (t->t_cursor.tp_col >= t->t_winsize.tp_col) { in teken_subr_regular_character()
854 if (t->t_cursor.tp_row == t->t_scrollreg.ts_end - 1) { in teken_subr_regular_character()
859 if (t->t_cursor.tp_row < in teken_subr_regular_character()
861 t->t_cursor.tp_row++; in teken_subr_regular_character()
863 t->t_cursor.tp_col = 0; in teken_subr_regular_character()
867 t->t_cursor.tp_col + 1 == t->t_winsize.tp_col) || in teken_subr_regular_character()
868 t->t_cursor.tp_col + width > t->t_winsize.tp_col)) { in teken_subr_regular_character()
877 if (t->t_cursor.tp_row == t->t_scrollreg.ts_end - 1) { in teken_subr_regular_character()
883 tp.tp_row = t->t_cursor.tp_row + 1; in teken_subr_regular_character()
890 teken_subr_do_putchar(t, &t->t_cursor, in teken_subr_regular_character()
899 t->t_cursor.tp_row = tp.tp_row; in teken_subr_regular_character()
900 t->t_cursor.tp_col = width; in teken_subr_regular_character()
904 teken_subr_do_putchar(t, &t->t_cursor, c, width); in teken_subr_regular_character()
905 t->t_cursor.tp_col += width; in teken_subr_regular_character()
907 if (t->t_cursor.tp_col >= t->t_winsize.tp_col) { in teken_subr_regular_character()
909 t->t_cursor.tp_col = t->t_winsize.tp_col - 1; in teken_subr_regular_character()
940 t->t_cursor.tp_row = t->t_cursor.tp_col = 0; in teken_subr_reset_dec_mode()
997 t->t_cursor.tp_row = t->t_cursor.tp_col = 0; in teken_subr_do_reset()
1026 t->t_cursor = t->t_saved_cursor; in teken_subr_restore_cursor()
1032 if (t->t_cursor.tp_row < t->t_originreg.ts_begin || in teken_subr_restore_cursor()
1033 t->t_cursor.tp_row >= t->t_originreg.ts_end) { in teken_subr_restore_cursor()
1046 if (t->t_cursor.tp_row > t->t_scrollreg.ts_begin) { in teken_subr_reverse_index()
1047 t->t_cursor.tp_row--; in teken_subr_reverse_index()
1059 t->t_saved_cursor = t->t_cursor; in teken_subr_save_cursor()
1097 t->t_cursor.tp_row = t->t_scrollreg.ts_begin; in teken_subr_set_dec_mode()
1098 t->t_cursor.tp_col = 0; in teken_subr_set_dec_mode()
1274 t->t_cursor.tp_row = t->t_originreg.ts_begin; in teken_subr_set_top_and_bottom_margins()
1275 t->t_cursor.tp_col = 0; in teken_subr_set_top_and_bottom_margins()
1313 teken_tab_clear(t, t->t_cursor.tp_col); in teken_subr_tab_clear()
1328 t->t_cursor.tp_row = row < t->t_originreg.ts_end ? in teken_subr_vertical_position_absolute()