чување 348858327f772eb1f495dcd8cd8faaaf86fe5f7b
родитељ 2d7d3dab1a828d76b88cb8a6b93ab53b16465867
Аутор: Страхиња Радић <sr@strahinja.org>
Датум: Fri, 20 Mar 2026 08:13:43 +0100
Update patches
Diffstat:
измењених датотека: 4, додавања: 39(+), брисања: 38(-)
diff --git a/patch/bw-theme.patch b/patch/bw-theme.patch
@@ -1,6 +1,6 @@
-From 14e8e9e18cf545b4698b0649386e9b5e923b035e Mon Sep 17 00:00:00 2001
+From 9eae6875a90fb3c6f53d9b59ec606f1d68d31c9e Mon Sep 17 00:00:00 2001
From: Страхиња Радић <sr@strahinja.org>
-Date: Wed Jan 28 13:44:55 2026 UTC
+Date: Fri Mar 20 07:13:12 2026 UTC
Subject: [PATCH] Set black and white theme
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
@@ -11,7 +11,7 @@ Content-Transfer-Encoding: 8bit
1 file changed, 12 insertions(+), 15 deletions(-)
diff --git a/config.def.h b/config.def.h
-index 43bc368c3..14e8e9e18 100644
+index 42070b9ab..9eae6875a 100644
--- a/config.def.h
+++ b/config.def.h
@@ -6,25 +6,22 @@
diff --git a/patch/dark-theme.patch b/patch/dark-theme.patch
@@ -1,16 +1,18 @@
-From 0b440ab77adc80bffe3f70db95461ca1fc139a2e Mon Sep 17 00:00:00 2001
+From e98cf28b086507af68f311ebfc4bec5d3ab4f2ae Mon Sep 17 00:00:00 2001
From: Страхиња Радић <sr@strahinja.org>
-Date: Wed Jan 28 13:56:27 2026 UTC
+Date: Thu Mar 19 13:02:48 2026 UTC
Subject: [PATCH] Set dark theme
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
-
+ config.def.h | 17+ 23-
+ sled.c | 2+ 0-
+ 2 files changed, 19 insertions(+), 23 deletions(-)
diff --git a/config.def.h b/config.def.h
-index ed73e7fdd..0b440ab77 100644
+index 2d7d3dab1..e98cf28b0 100644
--- a/config.def.h
+++ b/config.def.h
@@ -4,29 +4,23 @@
@@ -61,10 +63,10 @@ index ed73e7fdd..0b440ab77 100644
/* clang-format on */
diff --git a/sled.c b/sled.c
-index ed73e7fdd..0b440ab77 100644
+index 2d7d3dab1..e98cf28b0 100644
--- a/sled.c
+++ b/sled.c
-@@ -3196,6 +3196,8 @@ init_termbox:
+@@ -3198,6 +3198,8 @@ init_termbox:
goto main_done;
}
diff --git a/patch/light-theme.patch b/patch/light-theme.patch
@@ -1,6 +1,6 @@
-From d6a839b7924bf7c019415ee0cf7fd9810f4b7c51 Mon Sep 17 00:00:00 2001
+From 4f738d7ccd5fc16c87f845ab52894875217dd9b3 Mon Sep 17 00:00:00 2001
From: Страхиња Радић <sr@strahinja.org>
-Date: Wed Jan 28 13:49:52 2026 UTC
+Date: Thu Mar 19 13:17:09 2026 UTC
Subject: [PATCH] Set light theme
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
@@ -12,7 +12,7 @@ Content-Transfer-Encoding: 8bit
2 files changed, 19 insertions(+), 23 deletions(-)
diff --git a/config.def.h b/config.def.h
-index 0c976b588..d6a839b79 100644
+index 59666a896..4f738d7cc 100644
--- a/config.def.h
+++ b/config.def.h
@@ -4,29 +4,23 @@
@@ -63,10 +63,10 @@ index 0c976b588..d6a839b79 100644
/* clang-format on */
diff --git a/sled.c b/sled.c
-index 0c976b588..d6a839b79 100644
+index 59666a896..4f738d7cc 100644
--- a/sled.c
+++ b/sled.c
-@@ -3196,6 +3196,8 @@ init_termbox:
+@@ -3198,6 +3198,8 @@ init_termbox:
goto main_done;
}
diff --git a/patch/syntax.patch b/patch/syntax.patch
@@ -1,6 +1,6 @@
-From 712442a40714cc79c0a198f849a1ca1ecd860b42 Mon Sep 17 00:00:00 2001
+From a2fe7d7395de30598dd2068458bd5117a83fe51e Mon Sep 17 00:00:00 2001
From: Страхиња Радић <sr@strahinja.org>
-Date: Wed Jan 28 13:39:33 2026 UTC
+Date: Thu Mar 19 13:40:37 2026 UTC
Subject: [PATCH] Add syntax highlighting
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
@@ -10,11 +10,11 @@ Content-Transfer-Encoding: 8bit
config.def.h | 7+ 0-
draw.c | 618+ 31-
draw.h | 76+ 6-
- sled.c | 84+ 16-
- 4 files changed, 785 insertions(+), 53 deletions(-)
+ sled.c | 82+ 16-
+ 4 files changed, 783 insertions(+), 53 deletions(-)
diff --git a/config.def.h b/config.def.h
-index 48d828e53..712442a40 100644
+index 7d7234fc9..a2fe7d739 100644
--- a/config.def.h
+++ b/config.def.h
@@ -234,6 +234,13 @@ static const struct Key command_keys[] = {
@@ -32,7 +32,7 @@ index 48d828e53..712442a40 100644
{.format = "%s%s",
.callback = format_filename,
diff --git a/draw.c b/draw.c
-index 48d828e53..712442a40 100644
+index 7d7234fc9..a2fe7d739 100644
--- a/draw.c
+++ b/draw.c
@@ -3,6 +3,7 @@
@@ -875,7 +875,7 @@ index 48d828e53..712442a40 100644
}
diff --git a/draw.h b/draw.h
-index 48d828e53..712442a40 100644
+index 7d7234fc9..a2fe7d739 100644
--- a/draw.h
+++ b/draw.h
@@ -63,17 +63,69 @@ struct Color {
@@ -1012,7 +1012,7 @@ index 48d828e53..712442a40 100644
+ const uint16_t sbg, const int ssi, const int sei, const uint16_t slfg,
+ const uint16_t slbg);
diff --git a/sled.c b/sled.c
-index 48d828e53..712442a40 100644
+index 7d7234fc9..a2fe7d739 100644
--- a/sled.c
+++ b/sled.c
@@ -50,6 +50,18 @@ extern const char* prompt_reread_dirty;
@@ -1143,7 +1143,7 @@ index 48d828e53..712442a40 100644
return 0;
}
-@@ -1731,7 +1753,8 @@ paste_from_paste(struct DrawState* state)
+@@ -1733,7 +1755,8 @@ paste_from_paste(struct DrawState* state)
}
position_to(state, newpos.row, newpos.col);
@@ -1153,7 +1153,7 @@ index 48d828e53..712442a40 100644
paste_from_paste_cleanup:
free(rest);
-@@ -1997,6 +2020,7 @@ reread_file(struct DrawState* state)
+@@ -1999,6 +2022,7 @@ reread_file(struct DrawState* state)
}
recalculate_line_numbers(state);
@@ -1161,7 +1161,7 @@ index 48d828e53..712442a40 100644
return 0;
}
-@@ -2394,6 +2418,7 @@ simple_join_lines(struct DrawState* state)
+@@ -2396,6 +2420,7 @@ simple_join_lines(struct DrawState* state)
state->rows_count--;
state->dirty = 1;
recalculate_line_numbers(state);
@@ -1169,18 +1169,16 @@ index 48d828e53..712442a40 100644
return;
simple_join_lines_error:
-@@ -2870,7 +2895,9 @@ main(int argc, char** argv)
- int dir_access_errno;
+@@ -2873,6 +2898,8 @@ main(int argc, char** argv)
int saved_errno;
int tbires;
-- int optind = 1;
-+ int optind = 1;
+ int optind = 1;
+ int found_ending = 0;
+ int i;
*prompt = 0;
-@@ -2977,6 +3004,40 @@ main_options_loop:
+@@ -2979,6 +3006,40 @@ main_options_loop:
init_drawstate(&state, filename, prompt, 0, 0);
@@ -1221,22 +1219,23 @@ index 48d828e53..712442a40 100644
#ifdef __OpenBSD__
if (unveil(state.filename, "rwc") < 0)
{
-@@ -3196,9 +3257,11 @@ init_termbox:
+@@ -3197,11 +3258,11 @@ init_termbox:
+ errno = ERR_TB_ERROR;
goto main_done;
}
++ errno = 0;
++ state.maxx = 0;
++ state.recalculate_size = 1;
++ state.recalculate_syntax = 1;
- errno = 0;
- state.maxx = 0;
- state.recalculate_size = 1;
-+ errno = 0;
-+ state.maxx = 0;
-+ state.recalculate_size = 1;
-+ state.recalculate_size = 1;
-+ state.recalculate_syntax = 1;
-
+-
while (state.running)
{
-@@ -3210,6 +3273,11 @@ init_termbox:
+ tb_set_clear_attrs(colors[C_TEXT].fg, colors[C_TEXT].bg);
+@@ -3212,6 +3273,11 @@ init_termbox:
recalculate_size(&state);
state.recalculate_size = 0;
}