From fa3dbac3c18ecf3238b141e6aea1dddcb388e65b Mon Sep 17 00:00:00 2001 From: pommicket Date: Tue, 30 Sep 2025 11:27:10 -0400 Subject: Fix some weird whitespace --- ide-code-action.c | 2 +- lsp.c | 4 ---- pre-commit.sh | 2 +- syntax.c | 2 +- ui.c | 2 +- 5 files changed, 4 insertions(+), 8 deletions(-) diff --git a/ide-code-action.c b/ide-code-action.c index 3161130..edcae7c 100644 --- a/ide-code-action.c +++ b/ide-code-action.c @@ -211,7 +211,7 @@ void code_action_frame(Ted *ted) { if (rect_contains_point(entry_rect, ted->mouse_pos)) { // hovering over this entry ted->cursor = ted->cursor_hand; - gl_geometry_rect(entry_rect, settings_color(settings, COLOR_AUTOCOMPLETE_HL)); + gl_geometry_rect(entry_rect, settings_color(settings, COLOR_AUTOCOMPLETE_HL)); } arr_foreach_ptr(ted->mouse_clicks[SDL_BUTTON_LEFT], const MouseClick, click) if (rect_contains_point(entry_rect, click->pos)) diff --git a/lsp.c b/lsp.c index 9cf96fe..bd13366 100644 --- a/lsp.c +++ b/lsp.c @@ -488,10 +488,6 @@ static bool lsp_receive(LSP *lsp, size_t max_size) { json_free(&json); } size_t leftover_data_len = arr_len(lsp->received_data) - (response_offset + response_size); - - //printf("arr_cap = %u response_offset = %u, response_size = %zu, leftover len = %u\n", - // arr_hdr_(lsp->received_data)->cap, - // response_offset, response_size, leftover_data_len); memmove(lsp->received_data, lsp->received_data + response_offset + response_size, leftover_data_len); arr_set_len(lsp->received_data, leftover_data_len); diff --git a/pre-commit.sh b/pre-commit.sh index 3553140..ccf1943 100755 --- a/pre-commit.sh +++ b/pre-commit.sh @@ -6,5 +6,5 @@ # Check for trailing whitespace git grep -In ' $' && { echo 'Fix trailing whitespace!'; exit 1; } -git grep -In '\w'"$(printf '\t')"'$' && { echo 'Fix trailing whitespace!'; exit 1; } +git grep -In '\S'"$(printf '\t')" && { echo 'Fix trailing whitespace!'; exit 1; } exit 0 diff --git a/syntax.c b/syntax.c index 1803730..0996919 100644 --- a/syntax.c +++ b/syntax.c @@ -2139,7 +2139,7 @@ static void syntax_highlight_css(SyntaxState *state_ptr, const char32_t *line, u dealt_with = true; if (!in_braces && char_types) { goto handle_pseudo; - } else { + } else { --i; // we'll increment i from the for loop } break; diff --git a/ui.c b/ui.c index ce83c35..c53233e 100644 --- a/ui.c +++ b/ui.c @@ -648,7 +648,7 @@ void file_selector_render(Ted *ted, FileSelector *fs) { { const char *cwd = fs->cwd; const float text_width = text_get_size_vec2(font, cwd).x; - TextRenderState state = text_render_state_default; + TextRenderState state = text_render_state_default; state.x = bounds.pos.x; if (text_width > bounds.size.x) { // very long cwd -- cgit v1.2.3