Skip to content

Commit

Permalink
support array of trigger keys
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbrdo committed Jun 10, 2012
1 parent d91ae11 commit 5f20c5c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/rack/webconsole/repl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ def call(env)
pry = $pry

# repl loop
target = Pry.binding_for(pry.binding_stack.last || TOPLEVEL_BINDING)
if pry.binding_stack.last
target = Pry.binding_for(pry.binding_stack.last)
else
target = Pry.binding_for(TOPLEVEL_BINDING)
end
pry.repl_prologue(target) unless pry.binding_stack.last == target
pry.inject_sticky_locals(target)
code = params['query']
Expand Down
2 changes: 1 addition & 1 deletion public/webconsole.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@

$(document).ready(function() {
$(this).keypress(function(event) {
if (event.which == $KEY_CODE) {
if ($KEY_CODE.indexOf(event.which) >= 0) {
$("#rack-webconsole").slideToggle('fast', function() {
if ($(this).is(':visible')) {
$("#rack-webconsole form input").focus();
Expand Down

0 comments on commit 5f20c5c

Please sign in to comment.