mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-14 14:23:47 -05:00
Fix issues in tcell renderer and Windows build
- Fix display of CJK wide characters
- Fix horizontal offset of header lines
- Add support for keys with ALT modifier, shift-tab, page-up and down
- Fix util.ExecCommand to properly parse command-line arguments
- Fix redraw on resize
- Implement Pause/Resume for execute action
- Remove runtime check of GOOS
- Change exit status to 2 when tcell failed to start
- TBD: Travis CI build for tcell renderer
- Pending. tcell cannot reliably ingest keys from tmux send-keys
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"os/signal"
|
||||
"regexp"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"syscall"
|
||||
@@ -919,6 +920,9 @@ func keyMatch(key int, event tui.Event) bool {
|
||||
}
|
||||
|
||||
func quoteEntry(entry string) string {
|
||||
if util.IsWindows() {
|
||||
return strconv.Quote(strings.Replace(entry, "\"", "\\\"", -1))
|
||||
}
|
||||
return "'" + strings.Replace(entry, "'", "'\\''", -1) + "'"
|
||||
}
|
||||
|
||||
@@ -982,6 +986,9 @@ func (t *Terminal) executeCommand(template string, items []*Item) {
|
||||
cmd.Stderr = os.Stderr
|
||||
tui.Pause()
|
||||
cmd.Run()
|
||||
if tui.Resume() {
|
||||
t.printAll()
|
||||
}
|
||||
t.refresh()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user