controls/SearchResultPanel.py
branchpython3
changeset 3750 f62625418bff
parent 3303 0ffb41625592
child 3789 8def429216ca
--- a/controls/SearchResultPanel.py	Mon Mar 27 10:19:14 2023 +0200
+++ b/controls/SearchResultPanel.py	Fri Oct 28 12:39:15 2022 +0800
@@ -23,7 +23,7 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
 
-from __future__ import absolute_import
+
 from functools import reduce
 
 import wx
@@ -289,7 +289,7 @@
             start, end = infos["data"][1:3]
             text_lines = infos["text"].splitlines()
             start_idx = start[1]
-            end_idx = reduce(lambda x, y: x + y, map(lambda x: len(x) + 1, text_lines[:end[0] - start[0]]), end[1] + 1)
+            end_idx = reduce(lambda x, y: x + y, [len(x) + 1 for x in text_lines[:end[0] - start[0]]], end[1] + 1)
             style = wx.TextAttr(wx.BLACK, wx.Colour(206, 204, 247))
         elif infos["type"] is not None and infos["matches"] > 1:
             text = _("(%d matches)") % infos["matches"]