shithub: nvi

Download patch

ref: 265d50f4d363db60765b30697cd1c920190fd6ca
parent: 485a82a087b140233f79c0a1211686f5f9cc49f1
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Tue Jun 22 16:25:50 EDT 2021

skip empty strings when printing info

--- a/nvi.c
+++ b/nvi.c
@@ -92,9 +92,12 @@
 		for(i = 0, f = info->fmt; i < info->nfmt; i++, f++)
 			print("%d\t%s\t%Z\t%s\n", f->id, f->quality ? f->quality : "----", f->sz, f->type);
 		print("\n");
-		print("author: %s\n", info->author);
-		print("title: %s\n", info->title);
-		print("description: %s\n", info->description);
+		if(*info->author)
+			print("author: %s\n", info->author);
+		if(*info->title)
+			print("title: %s\n", info->title);
+		if(*info->description)
+			print("description: %s\n", info->description);
 		if(info->duration != 0)
 			print("duration: %P\n", info->duration);
 		if(info->published != 0)