Exemplo n.º 1
0
Arquivo: ui.c Projeto: qvacua/neovim
void ui_refresh(void)
{
  if (!ui_active()) {
    return;
  }

  if (updating_screen) {
    ui_schedule_refresh();
    return;
  }

  int width = INT_MAX, height = INT_MAX;
  bool ext_widgets[kUIExtCount];
  for (UIExtension i = 0; (int)i < kUIExtCount; i++) {
    ext_widgets[i] = true;
  }

  for (size_t i = 0; i < ui_count; i++) {
    UI *ui = uis[i];
    width = MIN(ui->width, width);
    height = MIN(ui->height, height);
    for (UIExtension i = 0; (int)i < kUIExtCount; i++) {
      ext_widgets[i] &= ui->ui_ext[i];
    }
  }

  row = col = 0;
  pending_cursor_update = true;

  ui_default_colors_set();

  int save_p_lz = p_lz;
  p_lz = false;  // convince redrawing() to return true ...
  screen_resize(width, height);
  p_lz = save_p_lz;

  for (UIExtension i = 0; (int)i < kUIExtCount; i++) {
    ui_ext[i] = ext_widgets[i];
    if (i < kUIGlobalCount) {
      ui_call_option_set(cstr_as_string((char *)ui_ext_names[i]),
                         BOOLEAN_OBJ(ext_widgets[i]));
    }
  }
  ui_mode_info_set();
  pending_mode_update = true;
  ui_cursor_shape();
}
Exemplo n.º 2
0
Arquivo: ui.c Projeto: Alok/neovim-1
void ui_refresh(void)
{
  if (!ui_active()) {
    return;
  }

  int width = INT_MAX, height = INT_MAX;

  for (size_t i = 0; i < ui_count; i++) {
    UI *ui = uis[i];
    width = ui->width < width ? ui->width : width;
    height = ui->height < height ? ui->height : height;
  }

  row = col = 0;
  screen_resize(width, height);
}
Exemplo n.º 3
0
Arquivo: ui.c Projeto: kranki/neovim
void ui_refresh(void)
{
  if (!ui_active()) {
    return;
  }

  int width = INT_MAX, height = INT_MAX;
  bool pum_external = true;

  for (size_t i = 0; i < ui_count; i++) {
    UI *ui = uis[i];
    width = ui->width < width ? ui->width : width;
    height = ui->height < height ? ui->height : height;
    pum_external &= ui->pum_external;
  }

  row = col = 0;
  screen_resize(width, height);
  pum_set_external(pum_external);
}