aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ui.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/ui.c')
-rw-r--r--src/nvim/ui.c72
1 files changed, 36 insertions, 36 deletions
diff --git a/src/nvim/ui.c b/src/nvim/ui.c
index 09709d0f43..aad72af025 100644
--- a/src/nvim/ui.c
+++ b/src/nvim/ui.c
@@ -3,40 +3,40 @@
#include <assert.h>
#include <inttypes.h>
+#include <limits.h>
#include <stdbool.h>
#include <string.h>
-#include <limits.h>
-#include "nvim/vim.h"
-#include "nvim/log.h"
+#include "nvim/ascii.h"
#include "nvim/aucmd.h"
-#include "nvim/ui.h"
#include "nvim/charset.h"
#include "nvim/cursor.h"
+#include "nvim/cursor_shape.h"
#include "nvim/diff.h"
+#include "nvim/event/loop.h"
#include "nvim/ex_cmds2.h"
#include "nvim/ex_getln.h"
#include "nvim/fold.h"
+#include "nvim/garray.h"
+#include "nvim/highlight.h"
+#include "nvim/log.h"
#include "nvim/main.h"
-#include "nvim/ascii.h"
-#include "nvim/misc1.h"
#include "nvim/mbyte.h"
-#include "nvim/garray.h"
#include "nvim/memory.h"
+#include "nvim/misc1.h"
#include "nvim/move.h"
#include "nvim/normal.h"
#include "nvim/option.h"
-#include "nvim/os_unix.h"
-#include "nvim/event/loop.h"
-#include "nvim/os/time.h"
#include "nvim/os/input.h"
#include "nvim/os/signal.h"
+#include "nvim/os/time.h"
+#include "nvim/os_unix.h"
#include "nvim/popupmnu.h"
#include "nvim/screen.h"
-#include "nvim/highlight.h"
+#include "nvim/ui.h"
#include "nvim/ui_compositor.h"
+#include "nvim/vim.h"
#include "nvim/window.h"
-#include "nvim/cursor_shape.h"
#ifdef FEAT_TUI
# include "nvim/tui/tui.h"
#else
@@ -70,9 +70,9 @@ static int pending_has_mouse = -1;
static size_t uilog_seen = 0;
static char uilog_last_event[1024] = { 0 };
-#ifndef EXITFREE
-#define entered_free_all_mem false
-#endif
+# ifndef EXITFREE
+# define entered_free_all_mem false
+# endif
# define UI_LOG(funname) \
do { \
@@ -95,7 +95,7 @@ static char uilog_last_event[1024] = { 0 };
// UI_CALL invokes a function on all registered UI instances.
// This is called by code generated by generators/gen_api_ui_events.lua
// C code should use ui_call_{funname} instead.
-# define UI_CALL(cond, funname, ...) \
+#define UI_CALL(cond, funname, ...) \
do { \
bool any_call = false; \
for (size_t i = 0; i < ui_count; i++) { \
@@ -115,7 +115,7 @@ static char uilog_last_event[1024] = { 0 };
#endif
#ifndef EXITFREE
-#undef entered_free_all_mem
+# undef entered_free_all_mem
#endif
void ui_init(void)
@@ -382,8 +382,8 @@ void ui_set_ext_option(UI *ui, UIExtension ext, bool active)
}
}
-void ui_line(ScreenGrid *grid, int row, int startcol, int endcol, int clearcol,
- int clearattr, bool wrap)
+void ui_line(ScreenGrid *grid, int row, int startcol, int endcol, int clearcol, int clearattr,
+ bool wrap)
{
assert(0 <= row && row < grid->Rows);
LineFlags flags = wrap ? kLineFlagWrap : 0;
@@ -515,23 +515,23 @@ void ui_check_mouse(void)
// normal editing mode (not at hit-return message).
for (char_u *p = p_mouse; *p; p++) {
switch (*p) {
- case 'a':
- if (vim_strchr((char_u *)MOUSE_A, checkfor) != NULL) {
- has_mouse = true;
- return;
- }
- break;
- case MOUSE_HELP:
- if (checkfor != MOUSE_RETURN && curbuf->b_help) {
- has_mouse = true;
- return;
- }
- break;
- default:
- if (checkfor == *p) {
- has_mouse = true;
- return;
- }
+ case 'a':
+ if (vim_strchr((char_u *)MOUSE_A, checkfor) != NULL) {
+ has_mouse = true;
+ return;
+ }
+ break;
+ case MOUSE_HELP:
+ if (checkfor != MOUSE_RETURN && curbuf->b_help) {
+ has_mouse = true;
+ return;
+ }
+ break;
+ default:
+ if (checkfor == *p) {
+ has_mouse = true;
+ return;
+ }
}
}
}