CTRL-L to clear and redraw the screen

This commit is contained in:
Junegunn Choi 2014-02-01 01:56:32 +09:00
parent b2d2be55ef
commit 96215c4619
2 changed files with 4 additions and 4 deletions

6
fzf
View File

@ -7,13 +7,13 @@
# / __/ / /_/ __/ # / __/ / /_/ __/
# /_/ /___/_/ Fuzzy finder for your shell # /_/ /___/_/ Fuzzy finder for your shell
# #
# Version: 0.7.1 (January 31, 2014) # Version: 0.7.2-devel (February 1, 2014)
# #
# Author: Junegunn Choi # Author: Junegunn Choi
# URL: https://github.com/junegunn/fzf # URL: https://github.com/junegunn/fzf
# License: MIT # License: MIT
# #
# Copyright (c) 2013 Junegunn Choi # Copyright (c) 2014 Junegunn Choi
# #
# MIT License # MIT License
# #
@ -683,7 +683,6 @@ class FZF
def start_renderer def start_renderer
Thread.new do Thread.new do
begin begin
refresh
while blk = @queue.shift while blk = @queue.shift
blk.call blk.call
refresh refresh
@ -766,6 +765,7 @@ class FZF
}, },
ctrl(:b) => proc { cursor = [0, cursor - 1].max; nil }, ctrl(:b) => proc { cursor = [0, cursor - 1].max; nil },
ctrl(:f) => proc { cursor = [input.length, cursor + 1].min; nil }, ctrl(:f) => proc { cursor = [input.length, cursor + 1].min; nil },
ctrl(:l) => proc { render { C.clear; C.refresh }; update_list true },
:alt_b => proc { backword.call; nil }, :alt_b => proc { backword.call; nil },
:alt_f => proc { :alt_f => proc {
cursor += (input[cursor..-1].index(/(\S\s)|(.$)/) || -1) + 1 cursor += (input[cursor..-1].index(/(\S\s)|(.$)/) || -1) + 1

View File

@ -1,7 +1,7 @@
# coding: utf-8 # coding: utf-8
Gem::Specification.new do |spec| Gem::Specification.new do |spec|
spec.name = 'fzf' spec.name = 'fzf'
spec.version = '0.7.1' spec.version = '0.7.2'
spec.authors = ['Junegunn Choi'] spec.authors = ['Junegunn Choi']
spec.email = ['junegunn.c@gmail.com'] spec.email = ['junegunn.c@gmail.com']
spec.description = %q{Fuzzy finder for your shell} spec.description = %q{Fuzzy finder for your shell}