patch 9.1.0798: too many strlen() calls in cmdhist.c

Problem:  too many strlen() calls in cmdhist.c
Solution: refactor code and remove strlen() calls
          (John Marriott)

closes: #15888

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/ex_getln.c b/src/ex_getln.c
index b7804d1..60e9641 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -1430,7 +1430,7 @@
 	else
 	{
 	    p = get_histentry(histype)[hiscnt].hisstr;
-	    plen = STRLEN(p);
+	    plen = get_histentry(histype)[hiscnt].hisstrlen;
 	}
 
 	if (histype == HIST_SEARCH