Beispiel #1
0
int _el_display_last_hist()
{
  if (where_history() < history_length()) {
    if (!_el_w2mb(_el_line_buffer, &rl_line_buffer)) {
      return -1;
    }
    replace_history_entry(where_history(), rl_line_buffer, NULL);
    _el_history_set_pos(history_length() + 1);
    _el_display_history();
  }
  
  return 0;
}
Beispiel #2
0
int _el_display_prev_hist()
{
  if (where_history() > 0) {
    if (!_el_w2mb(_el_line_buffer, &rl_line_buffer)) {
      return -1;
    }
    replace_history_entry(where_history(), rl_line_buffer, NULL);
    _el_previous_history();
    _el_display_history();
  }
  
  return 0;
}
Beispiel #3
0
int _el_display_first_hist()
{
  if (where_history() > 0) {
    if (!_el_w2mb(_el_line_buffer, &rl_line_buffer)) {
      return -1;
    }
    replace_history_entry(where_history(), rl_line_buffer, NULL);
    _el_history_set_pos(1);
    _el_display_history();
  }
  
  return 0;
}
Beispiel #4
0
int _el_display_next_hist()
{
    if (where_history() < (history_length() - 1)) {
        if (!_el_w2mb(_el_line_buffer, &rl_line_buffer)) {
            return -1;
        }
        replace_history_entry(where_history(), rl_line_buffer, NULL);
        next_history();
        _el_display_history();
    }

    return 0;
}