summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-12-29 12:12:36 -0500
committerpommicket <pommicket@gmail.com>2022-12-29 12:12:36 -0500
commit18fbb21e6b95139a8890ba4a65f4402df128ac84 (patch)
treee72f8f462465d14bf48a88372f90d2d347f025c9 /main.c
parent948decc409bac1e3671afc5d0212b4b35c669b4a (diff)
working hover
Diffstat (limited to 'main.c')
-rw-r--r--main.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/main.c b/main.c
index ba759f8..39e659b 100644
--- a/main.c
+++ b/main.c
@@ -124,10 +124,10 @@ static void die(char const *fmt, ...) {
#include "command.h"
#include "colors.h"
#include "time.c"
+#include "lsp.h"
#include "ted.h"
#include "gl.c"
#include "text.c"
-#include "lsp.h"
#include "string32.c"
#include "colors.c"
@@ -660,8 +660,6 @@ int main(int argc, char **argv) {
switch (event.type) {
case SDL_QUIT:
- hover_close(ted);
-
command_execute(ted, CMD_QUIT, 1);
break;
case SDL_MOUSEWHEEL: {
@@ -676,8 +674,6 @@ int main(int argc, char **argv) {
}
} break;
case SDL_MOUSEBUTTONDOWN: {
- hover_close(ted);
-
Uint32 button = event.button.button;
u8 times = event.button.clicks; // number of clicks
float x = (float)event.button.x, y = (float)event.button.y;
@@ -744,8 +740,6 @@ int main(int argc, char **argv) {
}
} break;
case SDL_MOUSEMOTION: {
- hover_close(ted);
-
float x = (float)event.motion.x, y = (float)event.motion.y;
if (ted->drag_buffer != ted->active_buffer)
ted->drag_buffer = NULL;
@@ -758,15 +752,11 @@ int main(int argc, char **argv) {
}
} break;
case SDL_KEYDOWN: {
- hover_close(ted);
-
SDL_Scancode scancode = event.key.keysym.scancode;
SDL_Keymod modifier = event.key.keysym.mod;
ted_press_key(ted, scancode, modifier);
} break;
case SDL_TEXTINPUT: {
- hover_close(ted);
-
char *text = event.text.text;
if (buffer
// unfortunately, some key combinations like ctrl+minus still register as a "-" text input event