m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-17 07:43:39 -05:00

Fix CTRL-Y key binding

With tmux-based test cases
This commit is contained in:
Junegunn Choi
2015-01-17 04:55:29 +09:00
parent 62acb9adc4
commit ae3180f919
6 changed files with 209 additions and 12 deletions

View File

@@ -22,7 +22,7 @@ VERSION = $(shell fzf/$(BINARY64) --version)
RELEASE32 = fzf-$(VERSION)-$(GOOS)_386
RELEASE64 = fzf-$(VERSION)-$(GOOS)_amd64
all: test release
all: release
release: build
cd fzf && \
@@ -30,13 +30,13 @@ release: build
cp $(BINARY64) $(RELEASE64) && tar -czf $(RELEASE64).tgz $(RELEASE64) && \
rm $(RELEASE32) $(RELEASE64)
build: fzf/$(BINARY32) fzf/$(BINARY64)
build: test fzf/$(BINARY32) fzf/$(BINARY64)
test:
go get
go test -v ./...
install: $(BINDIR)/fzf
install: build $(BINDIR)/fzf
uninstall:
rm -f $(BINDIR)/fzf $(BINDIR)/$(BINARY64)

View File

@@ -515,7 +515,8 @@ func (t *Terminal) Loop() {
t.rubout("[^[:alnum:]][[:alnum:]]")
}
case C.CtrlY:
t.input = append(append(t.input[:t.cx], t.yanked...), t.input[t.cx:]...)
suffix := copySlice(t.input[t.cx:])
t.input = append(append(t.input[:t.cx], t.yanked...), suffix...)
t.cx += len(t.yanked)
case C.Del:
t.delChar()