From 1c5e0150e1acb20a163afd6b4b51a7ac1585e8b1 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Tue, 23 Jul 2019 16:30:36 +0200 Subject: [PATCH] Avoid unnecessary conversion No need to convert here, it's already a string. --- view.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view.go b/view.go index 42082f8c..92b63183 100644 --- a/view.go +++ b/view.go @@ -493,7 +493,7 @@ func (v *View) Word(x, y int) (string, error) { } else { nr = nr + x } - return string(str[nl:nr]), nil + return str[nl:nr], nil } // indexFunc allows to split lines by words taking into account spaces