Help: Fix memory leak given ambiguous man page title on command line

Given a command line with an ambiguous man page title, such as `$ Help
uname`, Help would find and try to open all matching pages, leading to
bad behavior such as a memory leak, flickering scrollbars, and
eventually a crash due to OOM. This commit fixes the issue by making
Help only open one page on startup.
This commit is contained in:
Rummskartoffel 2021-12-26 15:52:33 +01:00 committed by Andreas Kling
parent b3672236bd
commit ab2c5eebec
Notes: sideshowbarker 2024-07-17 22:08:01 +09:00

View File

@ -331,6 +331,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
history.push(path);
open_page(path);
set_start_page = true;
break;
}
}