Lines Matching refs:term_curpos

418   int term_curpos;           /* The cursor position on the terminal */  member
905 static int gl_set_term_curpos(GetLine *gl, int term_curpos);
922 static int gl_displayed_tab_width(GetLine *gl, int term_curpos);
928 static int gl_displayed_char_width(GetLine *gl, char c, int term_curpos);
935 int term_curpos);
1792 gl->term_curpos = 0; in new_GetLine()
2957 int term_curpos = gl->term_curpos; in gl_add_char_to_line() local
2961 int width = gl_displayed_char_width(gl, c, term_curpos); in gl_add_char_to_line()
2989 gl_set_term_curpos(gl, term_curpos + width)) in gl_add_char_to_line()
2999 term_curpos); in gl_add_char_to_line()
3021 if(gl_set_term_curpos(gl, term_curpos + width)) in gl_add_char_to_line()
3034 gl_set_term_curpos(gl, term_curpos + width)) in gl_add_char_to_line()
3073 int term_curpos; /* The original value of gl->term_curpos */ in gl_add_string_to_line() local
3078 term_curpos = gl->term_curpos; in gl_add_string_to_line()
3083 term_slen = gl_displayed_string_width(gl, s, buff_slen, term_curpos); in gl_add_string_to_line()
3107 gl_set_term_curpos(gl, term_curpos + term_slen)) in gl_add_string_to_line()
3785 static int gl_displayed_tab_width(GetLine *gl, int term_curpos) in gl_displayed_tab_width() argument
3787 return TAB_WIDTH - ((term_curpos % gl->ncolumn) % TAB_WIDTH); in gl_displayed_tab_width()
3806 static int gl_displayed_char_width(GetLine *gl, char c, int term_curpos) in gl_displayed_char_width() argument
3809 return gl_displayed_tab_width(gl, term_curpos); in gl_displayed_char_width()
3834 int term_curpos) in gl_displayed_string_width() argument
3847 slen += gl_displayed_char_width(gl, string[i], term_curpos + slen); in gl_displayed_string_width()
3977 if(gl->term_curpos + n < 0) in gl_terminal_move_cursor()
3978 n = gl->term_curpos; in gl_terminal_move_cursor()
3982 cur_row = gl->term_curpos / gl->ncolumn; in gl_terminal_move_cursor()
3983 cur_col = gl->term_curpos % gl->ncolumn; in gl_terminal_move_cursor()
3984 new_row = (gl->term_curpos + n) / gl->ncolumn; in gl_terminal_move_cursor()
3985 new_col = (gl->term_curpos + n) % gl->ncolumn; in gl_terminal_move_cursor()
4046 gl->term_curpos += n; in gl_terminal_move_cursor()
4085 nchar = gl_displayed_tab_width(gl, gl->term_curpos); in gl_print_char()
4115 gl->term_curpos += nchar; in gl_print_char()
4120 if(gl->term_curpos > gl->term_len) in gl_print_char()
4121 gl->term_len = gl->term_curpos; in gl_print_char()
4128 if(gl->term_curpos % gl->ncolumn == 0) { in gl_print_char()
4129 int term_curpos = gl->term_curpos; in gl_print_char() local
4131 gl_set_term_curpos(gl, term_curpos)) in gl_print_char()
4180 static int gl_set_term_curpos(GetLine *gl, int term_curpos) in gl_set_term_curpos() argument
4182 return gl_terminal_move_cursor(gl, term_curpos - gl->term_curpos); in gl_set_term_curpos()
4912 if(gl_displayed_string_width(gl, from, -1, gl->term_curpos) == in KT_KEY_FN()
4913 gl_displayed_string_width(gl, swap, -1, gl->term_curpos)) { in KT_KEY_FN()
10461 gl->term_curpos = 0;
10557 int curs_line = gl->term_curpos / gl->ncolumn;
12165 int cursor_line = gl->term_curpos / gl->ncolumn;
12217 int term_curpos = gl->term_curpos; local
12233 if(gl->term_len / gl->ncolumn > gl->term_curpos / gl->ncolumn) {
12241 gl->term_curpos = gl->ncolumn * (term_curpos / gl->ncolumn + 1);
12245 gl_set_term_curpos(gl, term_curpos);
12250 gl->term_len = gl->term_curpos;
12482 gl->term_curpos = 0;