From 5063b0108c71ce218ab626656ae73f8f61a4110e Mon Sep 17 00:00:00 2001 From: Hannes Schueller Date: Tue, 23 Nov 2010 15:51:28 +0100 Subject: [PATCH] strip newline character from completion URLs --- utilities.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/utilities.c b/utilities.c index 3001d5a..9dd4d07 100644 --- a/utilities.c +++ b/utilities.c @@ -465,6 +465,10 @@ complete_list(const char *searchfor, const int mode, Listelement *elementlist) } else { strncpy(readelement, candidatepointer->element, MAXTAGSIZE); } + /* in the case of URLs without title, remove the line break */ + if (readelement[strlen(readelement) - 1] == '\n') { + readelement[strlen(readelement) - 1] = '\0'; + } elementlist = add_list(readelement, elementlist); n = count_list(elementlist); } -- 2.11.4.GIT