Lines Matching refs:term_curpos
419 int term_curpos; /* The cursor position on the terminal */ member
906 static int gl_set_term_curpos(GetLine *gl, int term_curpos);
923 static int gl_displayed_tab_width(GetLine *gl, int term_curpos);
929 static int gl_displayed_char_width(GetLine *gl, char c, int term_curpos);
936 int term_curpos);
1793 gl->term_curpos = 0; in new_GetLine()
2958 int term_curpos = gl->term_curpos; in gl_add_char_to_line() local
2962 int width = gl_displayed_char_width(gl, c, term_curpos); in gl_add_char_to_line()
2990 gl_set_term_curpos(gl, term_curpos + width)) in gl_add_char_to_line()
3000 term_curpos); in gl_add_char_to_line()
3022 if(gl_set_term_curpos(gl, term_curpos + width)) in gl_add_char_to_line()
3035 gl_set_term_curpos(gl, term_curpos + width)) in gl_add_char_to_line()
3074 int term_curpos; /* The original value of gl->term_curpos */ in gl_add_string_to_line() local
3079 term_curpos = gl->term_curpos; in gl_add_string_to_line()
3084 term_slen = gl_displayed_string_width(gl, s, buff_slen, term_curpos); in gl_add_string_to_line()
3108 gl_set_term_curpos(gl, term_curpos + term_slen)) in gl_add_string_to_line()
3786 static int gl_displayed_tab_width(GetLine *gl, int term_curpos) in gl_displayed_tab_width() argument
3788 return TAB_WIDTH - ((term_curpos % gl->ncolumn) % TAB_WIDTH); in gl_displayed_tab_width()
3807 static int gl_displayed_char_width(GetLine *gl, char c, int term_curpos) in gl_displayed_char_width() argument
3810 return gl_displayed_tab_width(gl, term_curpos); in gl_displayed_char_width()
3835 int term_curpos) in gl_displayed_string_width() argument
3848 slen += gl_displayed_char_width(gl, string[i], term_curpos + slen); in gl_displayed_string_width()
3978 if(gl->term_curpos + n < 0) in gl_terminal_move_cursor()
3979 n = gl->term_curpos; in gl_terminal_move_cursor()
3983 cur_row = gl->term_curpos / gl->ncolumn; in gl_terminal_move_cursor()
3984 cur_col = gl->term_curpos % gl->ncolumn; in gl_terminal_move_cursor()
3985 new_row = (gl->term_curpos + n) / gl->ncolumn; in gl_terminal_move_cursor()
3986 new_col = (gl->term_curpos + n) % gl->ncolumn; in gl_terminal_move_cursor()
4047 gl->term_curpos += n; in gl_terminal_move_cursor()
4086 nchar = gl_displayed_tab_width(gl, gl->term_curpos); in gl_print_char()
4116 gl->term_curpos += nchar; in gl_print_char()
4121 if(gl->term_curpos > gl->term_len) in gl_print_char()
4122 gl->term_len = gl->term_curpos; in gl_print_char()
4129 if(gl->term_curpos % gl->ncolumn == 0) { in gl_print_char()
4130 int term_curpos = gl->term_curpos; in gl_print_char() local
4132 gl_set_term_curpos(gl, term_curpos)) in gl_print_char()
4181 static int gl_set_term_curpos(GetLine *gl, int term_curpos) in gl_set_term_curpos() argument
4183 return gl_terminal_move_cursor(gl, term_curpos - gl->term_curpos); in gl_set_term_curpos()
4913 if(gl_displayed_string_width(gl, from, -1, gl->term_curpos) == in KT_KEY_FN()
4914 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;