Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package foot for openSUSE:Factory checked in 
at 2023-07-03 17:42:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/foot (Old)
 and      /work/SRC/openSUSE:Factory/.foot.new.13546 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "foot"

Mon Jul  3 17:42:01 2023 rev:21 rq:1096219 version:1.14.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/foot/foot.changes        2023-04-30 
16:07:56.788215030 +0200
+++ /work/SRC/openSUSE:Factory/.foot.new.13546/foot.changes     2023-07-03 
17:42:02.248454372 +0200
@@ -1,0 +2,30 @@
+Tue Jun 27 09:48:27 UTC 2023 - Soc Virnyl Estela <socvirnyl.est...@gmail.com>
+
+- Modify 
0002-ensure-scroll-region-endpoint-is-valid-after-a-window-resize.patch
+
+-------------------------------------------------------------------
+Mon Jun 26 21:58:34 UTC 2023 - Soc Virnyl Estela <socvirnyl.est...@gmail.com>
+
+- Add patches
+  * 0003-keep-empty-bottom-scroll-margin-empty-after-resize.patch
+  * 0004-fix-non-utf8-complaint.patch
+
+-------------------------------------------------------------------
+Mon Jun 26 21:51:34 UTC 2023 - Soc Virnyl Estela <socvirnyl.est...@gmail.com>
+
+- Add 0002-ensure-scroll-region-endpoint-is-valid-after-a-window-resize.patch
+  * render: ensure scroll region’s endpoint is valid after a window resize
+
+-------------------------------------------------------------------
+Mon Jun 26 09:49:10 UTC 2023 - Soc Virnyl Estela <socvirnyl.est...@gmail.com>
+
+- Add 0001-fix-crash-when-reflowing-alt-screen.patch
+  * render: resize: fix crash when reflowing the alt screen
+
+-------------------------------------------------------------------
+Mon Jun 26 09:15:54 UTC 2023 - Soc Virnyl Estela <socvirnyl.est...@gmail.com>
+
+- Add 0000-fix-scroll-damage-crash.patch.
+  * term: scroll: only record scroll damage when viewport is at the bottom.
+
+-------------------------------------------------------------------

New:
----
  0000-fix-scroll-damage-crash.patch
  0001-fix-crash-when-reflowing-alt-screen.patch
  0002-ensure-scroll-region-endpoint-is-valid-after-a-window-resize.patch
  0003-keep-empty-bottom-scroll-margin-empty-after-resize.patch
  0004-fix-non-utf8-complaint.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ foot.spec ++++++
--- /var/tmp/diff_new_pack.y0Tern/_old  2023-07-03 17:42:03.912464169 +0200
+++ /var/tmp/diff_new_pack.y0Tern/_new  2023-07-03 17:42:03.920464215 +0200
@@ -23,6 +23,11 @@
 License:        MIT
 URL:            https://codeberg.org/dnkl/foot
 Source0:        %{url}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
+Patch1:         0000-fix-scroll-damage-crash.patch
+Patch2:         0001-fix-crash-when-reflowing-alt-screen.patch
+Patch3:         
0002-ensure-scroll-region-endpoint-is-valid-after-a-window-resize.patch
+Patch4:         
https://codeberg.org/dnkl/foot/commit/a2db3cdd5b3b6ce0b782b5ee51d174f4b4890f26.patch#/0003-keep-empty-bottom-scroll-margin-empty-after-resize.patch
+Patch5:         
https://codeberg.org/dnkl/foot/commit/8859e134efa422d50e53c0bbb0e83d07ddf66091.patch#/0004-fix-non-utf8-complaint.patch
 Requires:       terminfo
 Requires:       utempter
 BuildRequires:  meson >= 0.58
@@ -69,7 +74,7 @@
 users an easy way to theme foot.
 
 %prep
-%autosetup -n %{name}
+%autosetup -p1 -n %{name}
 
 %build
 %meson \

++++++ 0000-fix-scroll-damage-crash.patch ++++++
From: Soc Virnyl Estela <socvirnyl.est...@gmail.com>
Date: Mon, Jun 26 05:13:10 PM PST 2023
Subject: [PATCH] term: scroll: only record scroll damage when viewport is at
the bottom. Patch adapted from commit 
https://codeberg.org/dnkl/foot/commit/8a3620bafaa4119b9f6d3f74189c2dac78614d3c

diff --git a/terminal.c b/terminal.c
index 0415351..e8eb49b 100644
--- a/terminal.c
+++ b/terminal.c
@@ -2693,6 +2693,7 @@ term_scroll_partial(struct terminal *term, struct 
scroll_region region, int rows
     term->grid->offset &= term->grid->num_rows - 1;
 
     if (likely(view_follows)) {
+        term_damage_scroll(term, DAMAGE_SCROLL, region, rows);
         selection_view_down(term, term->grid->offset);
         term->grid->view = term->grid->offset;
     } else if (unlikely(rows > view_sb_start_distance)) {
@@ -2716,7 +2717,6 @@ term_scroll_partial(struct terminal *term, struct 
scroll_region region, int rows
         erase_line(term, row);
     }
 
-    term_damage_scroll(term, DAMAGE_SCROLL, region, rows);
     term->grid->cur_row = grid_row(term->grid, term->grid->cursor.point.row);
 
 #if defined(_DEBUG)
@@ -2779,6 +2779,7 @@ term_scroll_reverse_partial(struct terminal *term,
     xassert(term->grid->offset < term->grid->num_rows);
 
     if (view_follows) {
+        term_damage_scroll(term, DAMAGE_SCROLL_REVERSE, region, rows);
         selection_view_up(term, term->grid->offset);
         term->grid->view = term->grid->offset;
     }
@@ -2797,7 +2798,6 @@ term_scroll_reverse_partial(struct terminal *term,
         erase_line(term, row);
     }
 
-    term_damage_scroll(term, DAMAGE_SCROLL_REVERSE, region, rows);
     term->grid->cur_row = grid_row(term->grid, term->grid->cursor.point.row);
 
 #if defined(_DEBUG)

++++++ 0001-fix-crash-when-reflowing-alt-screen.patch ++++++
From: Soc Virnyl Estela <socvirnyl.est...@gmail.com>
Date: Mon Jun 26 05:47:26 PM PST 2023
Subject: [PATCH] render: resize: fix crash when reflowing the alt screen

When doing an interactive resize, and `resize-delay-ms` > 0 (the
default), we would crash if the original screen size (i.e. the size
before the interactive resize started) was larger than the last window
size.

For example, if we interactively go from 85 rows to 75, and then
non-interactively went from 75 to 80, we’d crash.

The resizes had to be made in a single go. One way to trigger this was
to start an interactive resize on a floating window, and then *while
resizing* toggle the window’s floating mode.

Based on commit 
https://codeberg.org/dnkl/foot/commit/3a59cbbaa3906da6f9ab73ad949bc598318be7e4
---

diff --git a/render.c b/render.c
index 340e0378..1858467d 100644
--- a/render.c
+++ b/render.c
@@ -4030,7 +4030,9 @@ maybe_resize(struct terminal *term, int width, int 
height, bool force)
             term->interactive_resizing.old_hide_cursor = term->hide_cursor;
             term->interactive_resizing.grid = 
xmalloc(sizeof(*term->interactive_resizing.grid));
             *term->interactive_resizing.grid = term->normal;
-            term->interactive_resizing.selection_coords = 
term->selection.coords;
+
+            if (term->grid == &term->normal)
+                term->interactive_resizing.selection_coords = 
term->selection.coords;
         } else {
             /* We’ll replace the current temporary grid, with a new
              * one (again based on the original grid) */
@@ -4118,6 +4120,8 @@ maybe_resize(struct terminal *term, int width, int 
height, bool force)
     } else {
         /* Full text reflow */
 
+        int old_normal_rows = old_rows;
+
         if (term->interactive_resizing.grid != NULL) {
             /* Throw away the current, truncated, “normal” grid, and
              * use the original grid instead (from before the resize
@@ -4129,7 +4133,7 @@ maybe_resize(struct terminal *term, int width, int 
height, bool force)
             term->hide_cursor = term->interactive_resizing.old_hide_cursor;
             term->selection.coords = 
term->interactive_resizing.selection_coords;
 
-            old_rows = term->interactive_resizing.old_screen_rows;
+            old_normal_rows = term->interactive_resizing.old_screen_rows;
 
             term->interactive_resizing.grid = NULL;
             term->interactive_resizing.old_screen_rows = 0;
@@ -4145,7 +4149,7 @@ maybe_resize(struct terminal *term, int width, int 
height, bool force)
         };
 
         grid_resize_and_reflow(
-            &term->normal, new_normal_grid_rows, new_cols, old_rows, new_rows,
+            &term->normal, new_normal_grid_rows, new_cols, old_normal_rows, 
new_rows,
             term->selection.coords.end.row >= 0 ? ALEN(tracking_points) : 0,
             tracking_points);
     }

++++++ 0002-ensure-scroll-region-endpoint-is-valid-after-a-window-resize.patch 
++++++
From: Soc Virnyl Estela <socvirnyl.est...@gmail.com>
Date: Tue Jun 27 05:49:33 AM PST 2023
Subject: [PATCH] render: ensure scroll region’s endpoint is valid after a 
window resize

If we had a non-empty bottom scroll region, and the window was resized
to a smaller size, the scroll region was not reset correctly.

This led to a crash when scrolling the screen content.

Fix by making sure the scroll region’s endpoint is within range.

Based on commit 
https://codeberg.org/dnkl/foot/commit/e2baa6523875aaa13b6b7db80b7985978b8ee492
---

diff --git a/render.c b/render.c
index f16898b4..d39c9489 100644
--- a/render.c
+++ b/render.c
@@ -4128,8 +4128,7 @@ maybe_resize(struct terminal *term, int width, int 
height, bool force)
 
     if (term->scroll_region.start >= term->rows)
         term->scroll_region.start = 0;
-
-    if (term->scroll_region.end >= old_rows)
+    if (term->scroll_region.end > term->rows)
         term->scroll_region.end = term->rows;
 
     term->render.last_cursor.row = NULL;

++++++ 0003-keep-empty-bottom-scroll-margin-empty-after-resize.patch ++++++
>From a2db3cdd5b3b6ce0b782b5ee51d174f4b4890f26 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= <dan...@ekloef.se>
Date: Wed, 12 Apr 2023 18:09:41 +0200
Subject: [PATCH] render: regression: keep empty bottom scroll margin empty
 after resize

---
 render.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/render.c b/render.c
index d39c9489..521c8b7f 100644
--- a/render.c
+++ b/render.c
@@ -4128,8 +4128,11 @@ maybe_resize(struct terminal *term, int width, int 
height, bool force)
 
     if (term->scroll_region.start >= term->rows)
         term->scroll_region.start = 0;
-    if (term->scroll_region.end > term->rows)
+    if (term->scroll_region.end > term->rows ||
+        term->scroll_region.end >= old_rows)
+    {
         term->scroll_region.end = term->rows;
+    }
 
     term->render.last_cursor.row = NULL;
 

++++++ 0004-fix-non-utf8-complaint.patch ++++++
>From 8859e134efa422d50e53c0bbb0e83d07ddf66091 Mon Sep 17 00:00:00 2001
From: Phillip Susi <ph...@thesusis.net>
Date: Tue, 30 May 2023 15:49:01 -0400
Subject: [PATCH] Fix non UTF-8 locale complaint

If the locale isn't UTF-8, foot tries to fall back to C.UTF-8 and
prints a warning.  The warning was garbled because the name of the
original locale is no longer valid after calling setlocale() a
second time.  Use strdup to stash the original string.

Closes #1362
---
 main.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/main.c b/main.c
index 3f9846f3..f58e170f 100644
--- a/main.c
+++ b/main.c
@@ -450,6 +450,7 @@ main(int argc, char *const *argv)
             "C.UTF-8",
             "en_US.UTF-8",
         };
+        char *saved_locale = xstrdup(locale);
 
         /*
          * Try to force an UTF-8 locale. If we succeed, launch the
@@ -461,12 +462,12 @@ main(int argc, char *const *argv)
 
             if (setlocale(LC_CTYPE, fallback_locale) != NULL) {
                 LOG_WARN("'%s' is not a UTF-8 locale, using '%s' instead",
-                         locale, fallback_locale);
+                         saved_locale, fallback_locale);
 
                 user_notification_add_fmt(
                     &user_notifications, USER_NOTIFICATION_WARNING,
                     "'%s' is not a UTF-8 locale, using '%s' instead",
-                    locale, fallback_locale);
+                    saved_locale, fallback_locale);
 
                 bad_locale = false;
                 break;
@@ -476,13 +477,14 @@ main(int argc, char *const *argv)
         if (bad_locale) {
             LOG_ERR(
                 "'%s' is not a UTF-8 locale, and failed to find a fallback",
-                locale);
+                saved_locale);
 
             user_notification_add_fmt(
                 &user_notifications, USER_NOTIFICATION_ERROR,
                 "'%s' is not a UTF-8 locale, and failed to find a fallback",
-                locale);
+                saved_locale);
         }
+        free(saved_locale);
     }
 
     struct config conf = {NULL};

Reply via email to