Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,11 @@ Options:
if term.IsTerminal(int(os.Stdout.Fd())) {
lines := strings.Split(resp, "\n")
for i := range lines {
lines[i] = sanitizeName(lines[i])
cells := strings.Split(lines[i], "\t")
for j := range cells {
cells[j] = sanitizeName(cells[j])
}
lines[i] = strings.Join(cells, "\t")
}
resp = strings.Join(lines, "\n")
}
Expand Down
5 changes: 4 additions & 1 deletion ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -1299,6 +1299,9 @@ func listJumps(jumps []string, ind int) string {
fmt.Fprintln(t, " jump\tpath")
// print jumps in order of most recent, Vim uses the opposite order
for i, path := range slices.Backward(jumps) {
if strings.ContainsAny(path, "\n\r\t") {
continue
}
switch {
case i < ind:
fmt.Fprintf(t, " %*d\t%s\n", maxlength, ind-i, path)
Expand Down Expand Up @@ -1352,7 +1355,7 @@ func listFilesInCurrDir(nav *nav) string {

b := new(strings.Builder)
for _, file := range dir.files {
if strings.ContainsAny(file.path, "\n\r") {
if strings.ContainsAny(file.path, "\n\r\t") {
continue
}
fmt.Fprintln(b, file.path)
Expand Down