startup: don't erase screen on :hi Normal during startup

NB: existing `color default` test was actually enough to trigger the bug,
when ext_newgrid=false is used. I created the `:hi Normal` test as
I thought the builtin colors wouldn't set Normal (unless 'bg' is changed)
But as the root cause actually comes from `:hi Normal`, it makes sense
to still add the separate test (if `color default` here gets optimized to
become a no-op, or something).
This commit is contained in:
Björn Linse
2018-09-20 12:06:19 +02:00
parent 47d74bf32f
commit 5487624730
3 changed files with 39 additions and 7 deletions

View File

@@ -6884,7 +6884,7 @@ void do_highlight(const char *line, const bool forceit, const bool init)
// "fg", which have been changed now.
highlight_attr_set_all();
if (!ui_is_external(kUINewgrid) && starting != NO_SCREEN) {
if (!ui_is_external(kUINewgrid) && starting == 0) {
// Older UIs assume that we clear the screen after normal group is
// changed
ui_refresh();