Fix debug command in nomultiline mode#1006
Conversation
lib/irb/context.rb
Outdated
| end | ||
| end | ||
|
|
||
| def colorize_code(input, complete:) |
There was a problem hiding this comment.
I feel colorize_input express the intent better and is less likely to be confused with Color.colorize_code?
There was a problem hiding this comment.
It looks better, but I have one concern. colorize_input colorizes output. I think it is an input, but Reline's api calls it output.
Do you think the code below is acceptable? IMO... maybe yes?
Reline.output_modifier_proc = proc do |output, complete:|
IRB.CurrentContext.colorize_input(output, complete: complete)
endThere was a problem hiding this comment.
In IRB's context, it is input indeed. And in Reline's context, I think calling it both input or output are technically correct? Though since there's no input_modifier_proc, I feel it'd be a better name for the library user's perspective.
In this case, I feel a comment to clarify it would be enough, and maybe rename the output variable to input?
|
Thank you! |
(ruby/irb#1006) * Fix debug command in nomultiline mode * context.colorize_code -> context.colorize_input ruby/irb@71f4d6bfb5
Fixes #909 and #1003
Fix this bug
rendering test conflicts with #1001