Skip to content

Commit fb1cff5

Browse files
committed
no_repeat option
Entering an empty newline repeats the last command, such as `continue` or `list`. This configuration disable this feature. #1098
1 parent a9bbc70 commit fb1cff5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/debug/config.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ module DEBUGGER__
2323
no_reline: ['RUBY_DEBUG_NO_RELINE', "UI: Do not use Reline library", :bool, "false"],
2424
no_hint: ['RUBY_DEBUG_NO_HINT', "UI: Do not show the hint on the REPL", :bool, "false"],
2525
no_lineno: ['RUBY_DEBUG_NO_LINENO', "UI: Do not show line numbers", :bool, "false"],
26+
no_repeat: ['RUBY_DEBUG_NO_REPEAT', "UI: Do not repeat last line when empty line",:bool, "false"],
2627
irb_console: ["RUBY_DEBUG_IRB_CONSOLE", "UI: Use IRB as the console", :bool, "false"],
2728

2829
# control setting

lib/debug/session.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1144,7 +1144,7 @@ def register_default_command
11441144

11451145
def process_command line
11461146
if line.empty?
1147-
if @repl_prev_line
1147+
if @repl_prev_line && !CONFIG[:no_repeat]
11481148
line = @repl_prev_line
11491149
else
11501150
return :retry

0 commit comments

Comments
 (0)