Skip to content

Commit

Permalink
Remove wrong KDE arrow sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
tompng committed Jun 10, 2024
1 parent f931636 commit 3dc856a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
7 changes: 0 additions & 7 deletions lib/reline/io/ansi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,6 @@ def set_default_key_bindings_comprehensive_list(config)
[27, 91, 52, 126] => :ed_move_to_end, # End
[27, 91, 51, 126] => :key_delete, # Del

# KDE
# Del is 0x08
[27, 71, 65] => :ed_prev_history, # ↑
[27, 71, 66] => :ed_next_history, # ↓
[27, 71, 67] => :ed_next_char, # →
[27, 71, 68] => :ed_prev_char, # ←

# urxvt / exoterm
[27, 91, 55, 126] => :ed_move_to_beg, # Home
[27, 91, 56, 126] => :ed_move_to_end, # End
Expand Down
4 changes: 0 additions & 4 deletions test/reline/test_ansi_without_terminfo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,21 @@ def test_delete

def test_up_arrow
assert_key_binding("\e[A", :ed_prev_history) # Console (80x25)
assert_key_binding("\eGA", :ed_prev_history) # KDE
assert_key_binding("\eOA", :ed_prev_history)
end

def test_down_arrow
assert_key_binding("\e[B", :ed_next_history) # Console (80x25)
assert_key_binding("\eGB", :ed_next_history) # KDE
assert_key_binding("\eOB", :ed_next_history)
end

def test_right_arrow
assert_key_binding("\e[C", :ed_next_char) # Console (80x25)
assert_key_binding("\eGC", :ed_next_char) # KDE
assert_key_binding("\eOC", :ed_next_char)
end

def test_left_arrow
assert_key_binding("\e[D", :ed_prev_char) # Console (80x25)
assert_key_binding("\eGD", :ed_prev_char) # KDE
assert_key_binding("\eOD", :ed_prev_char)
end

Expand Down

0 comments on commit 3dc856a

Please sign in to comment.