api/ui: use ui options instead of one method per feature

Use new nvim_ui_ prefix to avoid breaking change.
This commit is contained in:
Björn Linse
2016-06-16 16:14:10 +02:00
parent 999af47be8
commit e968d72cae
5 changed files with 80 additions and 20 deletions

View File

@@ -27,6 +27,7 @@
#include "nvim/os/time.h"
#include "nvim/os/input.h"
#include "nvim/os/signal.h"
#include "nvim/popupmnu.h"
#include "nvim/screen.h"
#include "nvim/syntax.h"
#include "nvim/window.h"
@@ -166,15 +167,18 @@ void ui_refresh(void)
}
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);
}
void ui_resize(int new_width, int new_height)