File tree 3 files changed +6
-14
lines changed
3 files changed +6
-14
lines changed Original file line number Diff line number Diff line change 5
5
require (
6
6
github.com/gdamore/tcell/v2 v2.7.1
7
7
github.com/kyoh86/xdg v1.2.0
8
- github.com/rivo/tview v0.0.0-20240307173318-e804876934a1
8
+ github.com/rivo/tview v0.0.0-20241103174730-c76f7879f592
9
9
github.com/stretchr/testify v1.7.0
10
10
golang.org/x/term v0.17.0
11
11
)
Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZ
12
12
github.com/mattn/go-runewidth v0.0.15 /go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w =
13
13
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM =
14
14
github.com/pmezard/go-difflib v1.0.0 /go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4 =
15
- github.com/rivo/tview v0.0.0-20240307173318-e804876934a1 h1:bWLHTRekAy497pE7+nXSuzXwwFHI0XauRzz6roUvY+s =
16
- github.com/rivo/tview v0.0.0-20240307173318-e804876934a1 /go.mod h1:02iFIz7K/A9jGCvrizLPvoqr4cEIx7q54RH5Qudkrss =
15
+ github.com/rivo/tview v0.0.0-20241103174730-c76f7879f592 h1:YIJ+B1hePP6AgynC5TcqpO0H9k3SSoZa2BGyL6vDUzM =
16
+ github.com/rivo/tview v0.0.0-20241103174730-c76f7879f592 /go.mod h1:02iFIz7K/A9jGCvrizLPvoqr4cEIx7q54RH5Qudkrss =
17
17
github.com/rivo/uniseg v0.2.0 /go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc =
18
18
github.com/rivo/uniseg v0.4.3 /go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88 =
19
19
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ =
Original file line number Diff line number Diff line change @@ -28,7 +28,6 @@ import (
28
28
"log"
29
29
"os"
30
30
"os/exec"
31
- "regexp"
32
31
"path/filepath"
33
32
"strings"
34
33
"sync"
@@ -45,10 +44,6 @@ const defaultCommand string = "jq"
45
44
// jq filter
46
45
const specialChars string = ".-:$/"
47
46
48
- // Regular expression used to escape style/region tags. Modified from tview so
49
- // that it does not attempt to escape plain numbers
50
- var nonEscapePattern = regexp .MustCompile (`(\[[a-zA-Z_,;: \-\."#]+\[*)\]` )
51
-
52
47
const alphabet string = "abcdefghijklmnopqrstuvwxyz"
53
48
54
49
var Version string
@@ -378,11 +373,7 @@ func createApp(doc Document) *tview.Application {
378
373
}).
379
374
SetAutocompleteFunc (func (text string ) []string {
380
375
if text == "" {
381
- var entries []string
382
- for _ , item := range filterHistory .Items {
383
- entries = append (entries , nonEscapePattern .ReplaceAllString (item , "$1[]" ))
384
- }
385
- return entries
376
+ return filterHistory .Items
386
377
}
387
378
388
379
if pos := strings .LastIndexByte (text , '.' ); pos != - 1 {
@@ -446,7 +437,8 @@ func createApp(doc Document) *tview.Application {
446
437
447
438
return nil
448
439
}).
449
- SetAutocompleteStyles (tcell .ColorBlack , tcell .StyleDefault , tcell .StyleDefault .Reverse (true )).
440
+ SetAutocompleteUseTags (false ).
441
+ SetAutocompleteStyles (tcell .ColorBlack , tcell .StyleDefault .Background (tcell .ColorBlack ), tcell .StyleDefault .Reverse (true )).
450
442
SetTitle ("Filter" ).
451
443
SetBorder (true )
452
444
You can’t perform that action at this time.
0 commit comments