mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
Shell: factor out updating the path cache into a function.
This commit is contained in:
parent
f6d4c4f02c
commit
0622b60fbd
Notes:
sideshowbarker
2024-07-19 04:20:25 +09:00
Author: https://github.com/math2001
Commit: 0622b60fbd
Pull-request: https://github.com/SerenityOS/serenity/pull/2972
Reviewed-by: https://github.com/alimpfard ✅
4 changed files with 22 additions and 16 deletions
|
@ -367,9 +367,9 @@ RefPtr<Value> BarewordLiteral::run(RefPtr<Shell>)
|
|||
void BarewordLiteral::highlight_in_editor(Line::Editor& editor, Shell& shell, HighlightMetadata metadata)
|
||||
{
|
||||
if (metadata.is_first_in_list) {
|
||||
if (shell.is_runnable(m_text))
|
||||
if (shell.is_runnable(m_text)) {
|
||||
editor.stylize({ m_position.start_offset, m_position.end_offset }, { Line::Style::Bold });
|
||||
else {
|
||||
} else {
|
||||
editor.stylize({ m_position.start_offset, m_position.end_offset }, { Line::Style::Foreground(Line::Style::XtermColor::Red) });
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue