mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-18 16:45:38 -05:00
Rename variables
This commit is contained in:
8
fzf
8
fzf
@@ -82,7 +82,6 @@ class FZF
|
|||||||
@mouse = true
|
@mouse = true
|
||||||
@filter = nil
|
@filter = nil
|
||||||
@pending = nil
|
@pending = nil
|
||||||
@mutex = Mutex.new
|
|
||||||
|
|
||||||
argv =
|
argv =
|
||||||
if opts = ENV['FZF_DEFAULT_OPTS']
|
if opts = ENV['FZF_DEFAULT_OPTS']
|
||||||
@@ -130,6 +129,7 @@ class FZF
|
|||||||
|
|
||||||
@source = source.clone
|
@source = source.clone
|
||||||
@mtx = Mutex.new
|
@mtx = Mutex.new
|
||||||
|
@rmtx = Mutex.new
|
||||||
@cv = ConditionVariable.new
|
@cv = ConditionVariable.new
|
||||||
@events = {}
|
@events = {}
|
||||||
@new = []
|
@new = []
|
||||||
@@ -722,7 +722,7 @@ class FZF
|
|||||||
Thread.new do
|
Thread.new do
|
||||||
begin
|
begin
|
||||||
while blk = @queue.shift
|
while blk = @queue.shift
|
||||||
@mutex.synchronize do
|
@rmtx.synchronize do
|
||||||
blk.call
|
blk.call
|
||||||
refresh
|
refresh
|
||||||
end
|
end
|
||||||
@@ -780,7 +780,7 @@ class FZF
|
|||||||
end
|
end
|
||||||
|
|
||||||
def getch_nb
|
def getch_nb
|
||||||
@mutex.synchronize { C.getch }
|
@rmtx.synchronize { C.getch }
|
||||||
end
|
end
|
||||||
|
|
||||||
def getch
|
def getch
|
||||||
@@ -875,7 +875,7 @@ class FZF
|
|||||||
|
|
||||||
case ch = getch
|
case ch = getch
|
||||||
when C::KEY_MOUSE
|
when C::KEY_MOUSE
|
||||||
if m = @mutex.synchronize { C.getmouse }
|
if m = C.getmouse
|
||||||
st = m.bstate
|
st = m.bstate
|
||||||
if test_mouse(st, C::BUTTON1_PRESSED, C::BUTTON1_RELEASED)
|
if test_mouse(st, C::BUTTON1_PRESSED, C::BUTTON1_RELEASED)
|
||||||
if m.y == cursor_y
|
if m.y == cursor_y
|
||||||
|
|||||||
Reference in New Issue
Block a user