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

Reduce the number of Curses.refresh calls

This commit is contained in:
Junegunn Choi
2013-11-24 13:40:02 +09:00
parent 655fa5d9aa
commit 2d3a0a1034

4
fzf
View File

@@ -638,7 +638,9 @@ class FZF
Thread.new do Thread.new do
begin begin
while blk = @queue.shift while blk = @queue.shift
blk.call blks = [blk]
blks << blk while blk = (@queue.shift(true) rescue nil)
blks.each { |blk| blk.call }
refresh refresh
end end
rescue Exception => e rescue Exception => e