-
Notifications
You must be signed in to change notification settings - Fork 83
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
Separate prompt and input line in rendering #652
Conversation
ddca9a3
to
c2d49e1
Compare
Often, only one of prompt and input changes. Split prompt+input_line to a separate rendering item will improve differential rendering performance.
c2d49e1
to
f0f734d
Compare
lib/reline/line_editor.rb
Outdated
@@ -366,7 +366,7 @@ def screen_scroll_top | |||
@scroll_partial_screen | |||
end | |||
|
|||
def wrapped_lines | |||
def wrapped_prompt_lines |
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.
How about naming it wrapped_prompt_and_lines
or wrapped_prompt_and_input_lines
? This would make it clear that prompts and lines are returned separately.
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.
wrapped_prompt_and_input_lines
looks good, thanks!
updated
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.
LGTM 🌟
(ruby/reline#652) * Separate prompt and input line in rendering Often, only one of prompt and input changes. Split prompt+input_line to a separate rendering item will improve differential rendering performance. * Rename method wrapped_prompt_lines to more descriptive name ruby/reline@16d82f1f23
(ruby/reline#652) * Separate prompt and input line in rendering Often, only one of prompt and input changes. Split prompt+input_line to a separate rendering item will improve differential rendering performance. * Rename method wrapped_prompt_lines to more descriptive name ruby/reline@16d82f1f23
Split prompt and input_line passed to render_line_differential.
This will improve differential rendering performance in these cases
To separately render prompt and input_line, line items passed to render_line_differential is changed