Lines Matching refs:cmdbuf_pos
19 static int cmdbuf_pos = 0; variable
58 cmdbuf_pos = 0; in move_start()
65 cmdbuf_pos = cmdbuf_len; in move_end()
72 if (cmdbuf_pos > 0) { in move_left()
73 cmdbuf_pos--; in move_left()
81 if (cmdbuf_pos < cmdbuf_len) { in move_right()
82 cmdbuf_pos++; in move_right()
90 while (cmdbuf_pos > 0 && cmdbuf[cmdbuf_pos - 1] == ' ') in move_word_left()
91 cmdbuf_pos--; in move_word_left()
92 while (cmdbuf_pos > 0 && cmdbuf[cmdbuf_pos - 1] != ' ') in move_word_left()
93 cmdbuf_pos--; in move_word_left()
100 while (cmdbuf_pos < cmdbuf_len && cmdbuf[cmdbuf_pos] == ' ') in move_word_right()
101 cmdbuf_pos++; in move_word_right()
102 while (cmdbuf_pos < cmdbuf_len && cmdbuf[cmdbuf_pos] != ' ') in move_word_right()
103 cmdbuf_pos++; in move_word_right()
110 if (cmdbuf_pos == 0) in delete_left()
114 os_memmove(cmdbuf + cmdbuf_pos - 1, cmdbuf + cmdbuf_pos, in delete_left()
115 cmdbuf_len - cmdbuf_pos); in delete_left()
116 cmdbuf_pos--; in delete_left()
124 if (cmdbuf_pos == cmdbuf_len) in delete_current()
128 os_memmove(cmdbuf + cmdbuf_pos, cmdbuf + cmdbuf_pos + 1, in delete_current()
129 cmdbuf_len - cmdbuf_pos); in delete_current()
140 pos = cmdbuf_pos; in delete_word()
145 os_memmove(cmdbuf + pos, cmdbuf + cmdbuf_pos, cmdbuf_len - cmdbuf_pos); in delete_word()
146 cmdbuf_len -= cmdbuf_pos - pos; in delete_word()
147 cmdbuf_pos = pos; in delete_word()
154 if (cmdbuf_pos == 0) in clear_left()
158 os_memmove(cmdbuf, cmdbuf + cmdbuf_pos, cmdbuf_len - cmdbuf_pos); in clear_left()
159 cmdbuf_len -= cmdbuf_pos; in clear_left()
160 cmdbuf_pos = 0; in clear_left()
167 if (cmdbuf_pos == cmdbuf_len) in clear_right()
171 cmdbuf_len = cmdbuf_pos; in clear_right()
218 cmdbuf_len = cmdbuf_pos = os_strlen(history_curr->str); in history_use()
258 cmdbuf_len = cmdbuf_pos = os_strlen(currbuf); in history_next()
331 if (cmdbuf_len == cmdbuf_pos) { in insert_char()
332 cmdbuf[cmdbuf_pos++] = c; in insert_char()
337 os_memmove(cmdbuf + cmdbuf_pos + 1, cmdbuf + cmdbuf_pos, in insert_char()
338 cmdbuf_len - cmdbuf_pos); in insert_char()
339 cmdbuf[cmdbuf_pos++] = c; in insert_char()
357 cmdbuf_pos = 0; in process_cmd()
437 c = edit_completion_cb(edit_cb_ctx, cmdbuf, cmdbuf_pos); in complete()
441 end = cmdbuf_pos; in complete()
474 os_memmove(cmdbuf + cmdbuf_pos + len + add_space, cmdbuf + cmdbuf_pos, in complete()
475 cmdbuf_len - cmdbuf_pos); in complete()
476 os_memcpy(&cmdbuf[cmdbuf_pos - plen], c[0], plen + len); in complete()
478 cmdbuf[cmdbuf_pos + len] = ' '; in complete()
480 cmdbuf_pos += len + add_space; in complete()
923 cmdbuf_pos = cmdbuf_len; in search_stop()
1167 if (cmdbuf_pos != cmdbuf_len) { in edit_redraw()
1168 tmp = cmdbuf[cmdbuf_pos]; in edit_redraw()
1169 cmdbuf[cmdbuf_pos] = '\0'; in edit_redraw()
1171 cmdbuf[cmdbuf_pos] = tmp; in edit_redraw()