зеркало из https://github.com/github/ruby.git
Remove unnecessary branches
This commit is contained in:
Родитель
e36319249b
Коммит
4f9a4c1a8f
|
@ -1236,19 +1236,10 @@ class Reline::LineEditor
|
||||||
case prev_search_key
|
case prev_search_key
|
||||||
when "\C-r".ord
|
when "\C-r".ord
|
||||||
history_pointer_base = 0
|
history_pointer_base = 0
|
||||||
if change_direction
|
history = Reline::HISTORY[0..(@history_pointer - 1)]
|
||||||
history = Reline::HISTORY[0..@history_pointer]
|
|
||||||
else
|
|
||||||
history = Reline::HISTORY[0..(@history_pointer - 1)]
|
|
||||||
end
|
|
||||||
when "\C-s".ord
|
when "\C-s".ord
|
||||||
if change_direction
|
history_pointer_base = @history_pointer + 1
|
||||||
history_pointer_base = @history_pointer
|
history = Reline::HISTORY[(@history_pointer + 1)..-1]
|
||||||
history = Reline::HISTORY[(@history_pointer)..-1]
|
|
||||||
else
|
|
||||||
history_pointer_base = @history_pointer + 1
|
|
||||||
history = Reline::HISTORY[(@history_pointer + 1)..-1]
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
history_pointer_base = 0
|
history_pointer_base = 0
|
||||||
|
@ -1258,19 +1249,10 @@ class Reline::LineEditor
|
||||||
case prev_search_key
|
case prev_search_key
|
||||||
when "\C-r".ord
|
when "\C-r".ord
|
||||||
history_pointer_base = 0
|
history_pointer_base = 0
|
||||||
if change_direction
|
history = Reline::HISTORY[0..@history_pointer]
|
||||||
history = Reline::HISTORY[0..@history_pointer]
|
|
||||||
else
|
|
||||||
history = Reline::HISTORY[0..@history_pointer]
|
|
||||||
end
|
|
||||||
when "\C-s".ord
|
when "\C-s".ord
|
||||||
if change_direction
|
history_pointer_base = @history_pointer
|
||||||
history_pointer_base = @history_pointer
|
history = Reline::HISTORY[@history_pointer..-1]
|
||||||
history = Reline::HISTORY[(@history_pointer - 1)..-1]
|
|
||||||
else
|
|
||||||
history_pointer_base = @history_pointer
|
|
||||||
history = Reline::HISTORY[@history_pointer..-1]
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
history_pointer_base = 0
|
history_pointer_base = 0
|
||||||
|
|
Загрузка…
Ссылка в новой задаче