Skip to content
Snippets Groups Projects
Commit 19e24bd6 authored by Junegunn Choi's avatar Junegunn Choi
Browse files

Home/End/PgUp/PgDn/Del/(Ins)

parent 457a2404
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@
# / __/ / /_/ __/
# /_/ /___/_/ Fuzzy finder for your shell
#
# Version: 0.8.0 (March 7, 2014)
# Version: 0.8.0 (March 8, 2014)
#
# Author: Junegunn Choi
# URL: https://github.com/junegunn/fzf
......@@ -816,6 +816,12 @@ class FZF
when 66 then ctrl(:j)
when 65 then ctrl(:k)
when 90 then :stab
when 49 then read_nb(1); ctrl(:a)
when 50 then read_nb(1); :ins
when 51 then read_nb(1); :del
when 52 then read_nb(1); ctrl(:e)
when 53 then read_nb(1); :pgup
when 54 then read_nb(1); :pgdn
when 77
get_mouse
end
......@@ -912,6 +918,9 @@ class FZF
ctrl(:b) => proc { cursor = [0, cursor - 1].max; nil },
ctrl(:f) => proc { cursor = [input.length, cursor + 1].min; nil },
ctrl(:l) => proc { render { C.clear; C.refresh }; update_list true },
:del => proc { input[cursor] = '' if input.length > cursor },
:pgup => proc { vselect { |_| max_items } },
:pgdn => proc { vselect { |_| 0 } },
:alt_b => proc { backword.call; nil },
:alt_f => proc {
cursor += (input[cursor..-1].index(/(\S\s)|(.$)/) || -1) + 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment