We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When fuzzyfinder.WithPreviewWindow returns a string containing \t, an unintended line break occurs at that position.
package main import ( "fmt" "log" "github.com/ktr0731/go-fuzzyfinder" ) type Track struct { Name string AlbumName string Artist string } var tracks = []Track{ {"foo", "album1", "artist1"}, } func main() { idx, err := fuzzyfinder.FindMulti( tracks, func(i int) string { return tracks[i].Name }, fuzzyfinder.WithPreviewWindow(func(i, w, h int) string { if i == -1 { return "" } return fmt.Sprintf("Track: %s (%s)\nAlbum\t: %s", tracks[i].Name, tracks[i].Artist, tracks[i].AlbumName) })) if err != nil { log.Fatal(err) } fmt.Printf("selected: %v\n", idx) }
preview
Track: foo (artist1) Album : album1
\t should be displayed as a tab
This behavior is troublesome when we want to preview code that includes tabs.
Please let us know what do you think. Thank you!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When fuzzyfinder.WithPreviewWindow returns a string containing \t, an unintended line break occurs at that position.
To reproduce
preview
Expected behavior
\t should be displayed as a tab
Environment
Additional context
This behavior is troublesome when we want to preview code that includes tabs.
Please let us know what do you think. Thank you!
The text was updated successfully, but these errors were encountered: