Skip to content

Commit

Permalink
Sort completion list
Browse files Browse the repository at this point in the history
#### Legacy mode:

  ```console
  $ irb --legacy
  irb(main):001:0> l[TAB][TAB]
  lambda           load             local_variables  loop
  ```

#### Before this patch:

  ```console
  $ irb
  irb(main):001:0> l[TAB][TAB]
  local_variables
  loop
  lambda
  load
  ```

#### After this patch:

  ```console
  $ irb
  irb(main):001:0> l[TAB][TAB]
  lambda
  load
  local_variables
  loop
  ```
  • Loading branch information
shuujii committed Dec 27, 2019
1 parent b41024e commit 6074069
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/reline/line_editor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def rerender
if @menu_info
scroll_down(@highest_in_all - @first_line_started_from)
@rerender_all = true
@menu_info.list.each do |item|
@menu_info.list.sort!.each do |item|
Reline::IOGate.move_cursor_column(0)
@output.print item
@output.flush
Expand Down

0 comments on commit 6074069

Please sign in to comment.