Lines Matching refs:cursor_pos
754 hdt_cli.cursor_pos = 0; in reset_prompt()
828 hdt_cli.cursor_pos = 0; in start_cli_mode()
875 memset(&INPUT[hdt_cli.cursor_pos], 0, in start_cli_mode()
876 strlen(INPUT) - hdt_cli.cursor_pos); in start_cli_mode()
885 if (hdt_cli.cursor_pos > 0) { in start_cli_mode()
887 hdt_cli.cursor_pos--; in start_cli_mode()
892 if (hdt_cli.cursor_pos < (int)strlen(INPUT)) { in start_cli_mode()
894 hdt_cli.cursor_pos++; in start_cli_mode()
902 if ((strlen(INPUT) - hdt_cli.cursor_pos) > 0) { in start_cli_mode()
904 move_cursor_right(strlen(INPUT) - hdt_cli.cursor_pos); in start_cli_mode()
905 hdt_cli.cursor_pos = strlen(INPUT); in start_cli_mode()
913 if (hdt_cli.cursor_pos > 0) { in start_cli_mode()
915 move_cursor_left(hdt_cli.cursor_pos); in start_cli_mode()
916 hdt_cli.cursor_pos = 0; in start_cli_mode()
951 hdt_cli.cursor_pos = strlen(INPUT); in start_cli_mode()
992 hdt_cli.cursor_pos = strlen(INPUT); in start_cli_mode()
1005 hdt_cli.cursor_pos = strlen(INPUT); in start_cli_mode()
1054 if (hdt_cli.cursor_pos >= strlen(INPUT)) in start_cli_mode()
1057 for (int c = hdt_cli.cursor_pos; c < (int)strlen(INPUT) - 1; c++) in start_cli_mode()
1065 printf("%s", INPUT + hdt_cli.cursor_pos); in start_cli_mode()
1068 if (strlen(INPUT + hdt_cli.cursor_pos) > 0) in start_cli_mode()
1069 move_cursor_left(strlen(INPUT + hdt_cli.cursor_pos)); in start_cli_mode()
1075 if (hdt_cli.cursor_pos == 0) in start_cli_mode()
1078 for (int c = hdt_cli.cursor_pos - 1; in start_cli_mode()
1090 printf("%s", INPUT + hdt_cli.cursor_pos - 1); in start_cli_mode()
1093 hdt_cli.cursor_pos--; in start_cli_mode()
1094 move_cursor_to_column(strlen(hdt_cli.prompt) + hdt_cli.cursor_pos + in start_cli_mode()
1109 if (hdt_cli.cursor_pos > MAX_LINE_SIZE - 2) in start_cli_mode()
1112 if (hdt_cli.cursor_pos < (int)strlen(INPUT)) { in start_cli_mode()
1114 int trailing_chars = strlen(INPUT) - hdt_cli.cursor_pos; in start_cli_mode()
1116 strlcpy(temp_command, INPUT, hdt_cli.cursor_pos); in start_cli_mode()
1120 INPUT + hdt_cli.cursor_pos, trailing_chars); in start_cli_mode()
1128 printf("%s", INPUT + hdt_cli.cursor_pos); in start_cli_mode()
1135 INPUT[hdt_cli.cursor_pos] = current_key; in start_cli_mode()
1137 hdt_cli.cursor_pos++; in start_cli_mode()