aboutsummaryrefslogtreecommitdiff
path: root/src/popupmnu.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/popupmnu.c')
-rw-r--r--src/popupmnu.c35
1 files changed, 22 insertions, 13 deletions
diff --git a/src/popupmnu.c b/src/popupmnu.c
index ff28fc2676..293e1f0bb2 100644
--- a/src/popupmnu.c
+++ b/src/popupmnu.c
@@ -11,7 +11,16 @@
* popupmnu.c: Popup menu (PUM)
*/
#include "vim.h"
-
+#include "popupmnu.h"
+#include "charset.h"
+#include "ex_cmds.h"
+#include "memline.h"
+#include "misc2.h"
+#include "move.h"
+#include "option.h"
+#include "screen.h"
+#include "search.h"
+#include "window.h"
static pumitem_T *pum_array = NULL; /* items of displayed pum */
static int pum_size; /* nr of items in "pum_array" */
@@ -40,11 +49,13 @@ static int pum_set_selected __ARGS((int n, int repeat));
* When possible the leftmost character is aligned with screen column "col".
* The menu appears above the screen line "row" or at "row" + "height" - 1.
*/
-void pum_display(array, size, selected)
-pumitem_T *array;
-int size;
-int selected; /* index of initially selected item, none if
+void
+pum_display (
+ pumitem_T *array,
+ int size,
+ int selected /* index of initially selected item, none if
out of range */
+)
{
int w;
int def_width;
@@ -231,7 +242,7 @@ redo:
/*
* Redraw the popup menu, using "pum_first" and "pum_selected".
*/
-void pum_redraw() {
+void pum_redraw(void) {
int row = pum_row;
int col;
int attr_norm = highlight_attr[HLF_PNI];
@@ -415,9 +426,7 @@ void pum_redraw() {
* Returns TRUE when the window was resized and the location of the popup menu
* must be recomputed.
*/
-static int pum_set_selected(n, repeat)
-int n;
-int repeat;
+static int pum_set_selected(int n, int repeat)
{
int resized = FALSE;
int context = pum_height / 2;
@@ -584,7 +593,7 @@ int repeat;
/*
* Undisplay the popup menu (later).
*/
-void pum_undisplay() {
+void pum_undisplay(void) {
pum_array = NULL;
redraw_all_later(SOME_VALID);
redraw_tabline = TRUE;
@@ -595,7 +604,7 @@ void pum_undisplay() {
* Clear the popup menu. Currently only resets the offset to the first
* displayed item.
*/
-void pum_clear() {
+void pum_clear(void) {
pum_first = 0;
}
@@ -603,7 +612,7 @@ void pum_clear() {
* Return TRUE if the popup menu is displayed.
* Overruled when "pum_do_redraw" is set, used to redraw the status lines.
*/
-int pum_visible() {
+int pum_visible(void) {
return !pum_do_redraw && pum_array != NULL;
}
@@ -611,7 +620,7 @@ int pum_visible() {
* Return the height of the popup menu, the number of entries visible.
* Only valid when pum_visible() returns TRUE!
*/
-int pum_get_height() {
+int pum_get_height(void) {
return pum_height;
}