Skip to content

Commit

Permalink
Merge pull request #8462 from blakejohnson/default-ignore
Browse files Browse the repository at this point in the history
Fix #8446.
  • Loading branch information
ivarne committed Sep 24, 2014
2 parents c344abd + 914ab70 commit 3d95f64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base/LineEdit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -731,8 +731,8 @@ function match_input(keymap::Dict, s, cs=Char[])
c = read(terminal(s), Char)
push!(cs, c)
k = haskey(keymap, c) ? c : '\0'
return match_input(keymap[k], s, cs)
# perhaps better would be: match_input(get(keymap, k, nothing), s, cs) ?
# if we don't match on the key, look for a default action then fallback on 'nothing' to ignore
return match_input(get(keymap, k, nothing), s, cs)
end

keymap_fcn(f::Nothing, s, c) = (s, p) -> return :ok
Expand Down

0 comments on commit 3d95f64

Please sign in to comment.