Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce a new class Reline::Face to configure character attributes #552
Introduce a new class Reline::Face to configure character attributes #552
Changes from 33 commits
1224863
17114b9
e033f88
629db24
a993e52
cab307f
e4d61dd
0e7acfb
b442c57
389ff41
c3f92f1
d652fc0
1550519
6e4b4e9
e8eb85b
7ea200e
26cb115
9286c59
f001348
28197be
efb75ed
e7a6d56
5a53084
67a8497
c02205c
728ca2d
cde902e
23d2360
2eee3b0
76dd7b0
1ce4818
7c5133c
a33109f
544f3d1
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this config required for? It does not appear to be used.
Sorry if I have missed it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In IRB,
configs[:default]
is used for all character output except the completion dialog.Actually,
:enhanced
and:scrollbar
are not used.I was also unsure whether to keep them or not, but even if they were there, IRB wouldn't malfunction so I left it. But should they be deleted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like IRB's document dialog (which does not specify face yet) use it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for letting me know.
Does it mean that a
default
value is used if theface
argument is not provided inReline::DialogRenderInfo.new
?Like this code https://github.com/ruby/irb/blob/v1.8.3/lib/irb/input-method.rb#L382
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/ruby/reline/pull/552/files#diff-082d93e1b70331eead4465512d8e0f47b9a91734b7c899d5929168c620cf8025R65-R67
As a result of ensuring that the absence of
:enhanced
and:scrollbar
attributes are not broken even if the user forgets the scrollbar attribute in the completion_dialog config, enhanced and scrollbar attributes are automatically created in the:default
config, too.This is kind of a compromise with the existing implementation, where the concept of "completion_dialog" basically belongs to the IRB, but the SGR settings are set on the Reline side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I overlooked tompng's comment.
default config is used here https://github.com/ruby/reline/pull/552/files#diff-9703d9141e08b96c2d616930b207873b52dc9eb68b81223818fe250cdb0e927fR834
Totally I made confusing this thread, lol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I understood.