summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2015-01-17 04:55:29 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2015-01-17 06:04:59 +0900
commitae3180f91994cd6129dbb80144cda4b1abeb6ec0 (patch)
tree778636b2d765db20b9aa1a1323f5f183d7f01651 /src
parent62acb9adc47e714a427f12cb2e2c6ebca0bd7f38 (diff)
Fix CTRL-Y key binding
With tmux-based test cases
Diffstat (limited to 'src')
-rw-r--r--src/Makefile6
-rw-r--r--src/terminal.go3
2 files changed, 5 insertions, 4 deletions
diff --git a/src/Makefile b/src/Makefile
index 4610e586..eda04040 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -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)
diff --git a/src/terminal.go b/src/terminal.go
index 44796cec..abd70690 100644
--- a/src/terminal.go
+++ b/src/terminal.go
@@ -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()