From ba0935c71f5507958056201ddad2fc48674a586d Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Mon, 13 Jan 2025 12:45:01 +0900 Subject: Fix change-nth * Proper clean-up of caches * Force rerender list after the action --- src/item.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/item.go') diff --git a/src/item.go b/src/item.go index c07d7fff..6b91d069 100644 --- a/src/item.go +++ b/src/item.go @@ -6,10 +6,17 @@ import ( "github.com/junegunn/fzf/src/util" ) +type transformed struct { + // Because nth can be changed dynamically by change-nth action, we need to + // keep the nth value at the time of transformation. + nth []Range + tokens []Token +} + // Item represents each input line. 56 bytes. type Item struct { text util.Chars // 32 = 24 + 1 + 1 + 2 + 4 - transformed *[]Token // 8 + transformed *transformed // 8 origText *[]byte // 8 colors *[]ansiOffset // 8 } -- cgit v1.2.3