summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2014-03-08 01:55:48 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2014-03-08 01:55:48 +0900
commitf345bf7983656473c4fbe4b71130189765fa4da7 (patch)
treef2c336259b4b0dc0a62d8cb369f0daccbe065716
parent875f9b6534df7a3b9020b922e1902cfd4a3fcbc1 (diff)
Shift-left/right on OSX0.8.0
-rwxr-xr-xfzf15
1 files changed, 14 insertions, 1 deletions
diff --git a/fzf b/fzf
index ec10ce4a..ace205d8 100755
--- a/fzf
+++ b/fzf
@@ -764,6 +764,14 @@ class FZF
default
end
+ def read_nbs
+ ords = []
+ while ord = read_nb
+ ords << ord
+ end
+ ords
+ end
+
def get_mouse
case ord = read_nb
when 32, 36, 40, 48, # mouse-down / shift / cmd / ctrl
@@ -827,7 +835,12 @@ class FZF
when 51 then read_nb; :del
when 53 then read_nb; :pgup
when 54 then read_nb; :pgdn
- when 49 then read_nb; ctrl(:a)
+ when 49
+ case read_nbs
+ when [59, 50, 68] then ctrl(:a)
+ when [59, 50, 67] then ctrl(:e)
+ when [126] then ctrl(:a)
+ end
when 52 then read_nb; ctrl(:e)
when 72 then ctrl(:a)
when 70 then ctrl(:e)