From c0acccde2469cb508d5db85dd63be13ee4b716a3 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 8 Nov 2019 06:43:25 +0530 Subject: [PATCH] Viewer/Content server: Fix history for completion popups such as search bars not being stored correctly. Fixes #1847976 [feature request: viewer 4 search history as in viewer 3](https://bugs.launchpad.net/calibre/+bug/1847976) --- src/pyj/complete.pyj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pyj/complete.pyj b/src/pyj/complete.pyj index 74a5fe1a11..6d944ef6de 100644 --- a/src/pyj/complete.pyj +++ b/src/pyj/complete.pyj @@ -83,7 +83,7 @@ def create_search_bar(action, name, tooltip=None, placeholder=None, button=None, items = local_storage().get(history_name) or v'[]' idx = items.indexOf(text) if idx > -1: - items = items.splice(idx, 1) + items.splice(idx, 1) items.unshift(text) local_storage().set(history_name, uniq(items[:history_size])) update_completion_items()