- )
- )
- );
-
- console_history_get( vg_console.input, vg_console.history_pos );
- console_move_cursor( &vg_console.cursor_user,
- &vg_console.cursor_pos,
- vg_list_size(vg_console.input)-1, 1);
-}
-
-VG_STATIC void _console_backspace(void)
-{
- vg_console.cursor_user = console_delete_char( -1 );
- vg_console.cursor_pos = vg_console.cursor_user;
-}
-
-VG_STATIC void _console_delete(void)
-{
- vg_console.cursor_user = console_delete_char( 1 );
- vg_console.cursor_pos = vg_console.cursor_user;
-}
-
-VG_STATIC void _console_home_select(void)
-{
- console_move_cursor( &vg_console.cursor_user, NULL, -10000, 0 );
-}
-
-VG_STATIC void _console_home(void)
-{
- console_move_cursor( &vg_console.cursor_user,
- &vg_console.cursor_pos, -10000, 1 );
-}
-
-VG_STATIC void _console_end_select(void)
-{
- console_move_cursor( &vg_console.cursor_user, NULL, 10000, 0 );
-}
-
-VG_STATIC void _console_end(void)
-{
- console_move_cursor( &vg_console.cursor_user,
- &vg_console.cursor_pos,
- vg_list_size(vg_console.input)-1, 1 );
-}
-
-VG_STATIC void _console_select_all(void)
-{
- console_move_cursor( &vg_console.cursor_user, NULL, 10000, 0);
- console_move_cursor( &vg_console.cursor_pos, NULL, -10000, 0);
-}
-
-VG_STATIC void _console_cut(void)
-{
- console_to_clipboard();
- vg_console.cursor_user = console_delete_char(0);
- vg_console.cursor_pos = vg_console.cursor_user;
-}
-
-VG_STATIC void _console_enter(void)
-{
- if( !strlen( vg_console.input ) )
- return;
-
- vg_info( "%s\n", vg_console.input );
-
- if( strcmp( vg_console.input,
- vg_console.history[ vg_console.history_last ]) )
- {
- vg_console.history_last = ( vg_console.history_last + 1) %
- vg_list_size(vg_console.history );
- vg_console.history_count =
- VG_MIN( vg_list_size( vg_console.history ),
- vg_console.history_count + 1 );
- strcpy( vg_console.history[ vg_console.history_last ],
- vg_console.input );