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:
Junegunn Choi
2016-11-07 02:15:34 +09:00
parent 26895da969
commit 898d8d94c8
9 changed files with 96 additions and 33 deletions

View File

@@ -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()
}