commit 6f96c07f35aad5403a539fe94ea4e37c37e2c08f
Author: Paul Howarth <paul(a)city-fan.org>
Date: Mon Feb 28 14:36:28 2022 +0000
Applied the following patch from OpenSUSE: xv-3.10a-dirw.dif
In the file selection box, do not move the cursor if no filename is
there [Novell BZ #506573].
xv-3.10a-dirw.patch | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
---
diff --git a/xv-3.10a-dirw.patch b/xv-3.10a-dirw.patch
new file mode 100644
index 0000000..fde4e04
--- /dev/null
+++ b/xv-3.10a-dirw.patch
@@ -0,0 +1,28 @@
+From dea8967483b00f67d311c44c6d184098c2904fa5 Mon Sep 17 00:00:00 2001
+From: Michael Adams <mdadams(a)ece.uvic.ca>
+Date: Sat, 19 Feb 2022 08:05:00 -0800
+Subject: [PATCH] Applied the following patch from OpenSUSE:
+ xv-3.10a-dirw.dif
+
+---
+ src/xvdir.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/xvdir.c b/src/xvdir.c
+index 28e1fb3..c947b69 100644
+--- a/src/xvdir.c
++++ b/src/xvdir.c
+@@ -556,6 +556,10 @@ int x,y;
+ if (XTextWidth(mfinfo, &filename[stPos], 1+pos-stPos) > tx)
+ break;
+ }
++
++ if (pos == 0)
++ return -1;
++
+ /* if we are more than halfway past this char, put the insertion point after it */
+ dx = tx - XTextWidth(mfinfo, &filename[stPos], pos-stPos);
+ if (dx > XTextWidth(mfinfo, &filename[pos], 1)/2)
+--
+2.35.1
+