From 878346d1316d9fe649eecc444bf1c81a843fdc05 Mon Sep 17 00:00:00 2001 From: Noboru Saito Date: Sun, 1 Sep 2024 08:46:26 +0900 Subject: [PATCH] Fix paste mistakes Fix the conditions of incremental search, If the event is accumulated, do not execute. The paste on the system side (not a `tcell` event) is to miss the event because a key event occurs for each character. This fixes #613. --- oviewer/search.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/oviewer/search.go b/oviewer/search.go index 7ba9f17b..e463a4ac 100644 --- a/oviewer/search.go +++ b/oviewer/search.go @@ -535,6 +535,9 @@ func (root *Root) sendSearchMove(lineNum int) { // incrementalSearch performs incremental search by setting and input mode. func (root *Root) incrementalSearch(ctx context.Context) { + if root.Screen.HasPendingEvent() { + return + } if !root.Config.Incsearch { return }