Skip to content

Commit 3436610

Browse files
committed
Fix user screen color in corner cases
1 parent d71995a commit 3436610

3 files changed

Lines changed: 13 additions & 3 deletions

File tree

far/changelog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
--------------------------------------------------------------------------------
2+
drkns 2026-08-11 21:39:09+01:00 - build 6727
3+
4+
1. Fix user screen color in corner cases.
5+
16
--------------------------------------------------------------------------------
27
drkns 2026-08-08 15:11:37+01:00 - build 6726
38

far/console_session.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,20 @@ void console_session::activate(std::optional<string_view> const Command, bool co
101101
// BUGBUG, implement better & safer way to do this
102102
SCOPE_EXIT{ Global->ScrBuf->SetLockCount(LockCount); };
103103

104+
const auto UserScreenColor = colors::PaletteColorToFarColor(COL_COMMANDLINEUSERSCREEN);
105+
const auto YPos = ScrY - (Global->Opt->ShowKeyBar? 1 : 0);
106+
107+
Global->ScrBuf->FillRect({ 0, YPos, ScrX, ScrY }, { L' ', {}, {}, UserScreenColor });
108+
104109
SetInitialCursorType();
105110

106111
Global->ScrBuf->Flush();
107112

108-
console.SetTextAttributes(colors::PaletteColorToFarColor(COL_COMMANDLINEUSERSCREEN));
113+
console.SetTextAttributes(UserScreenColor);
109114

110115
scroll(margin(NewLine, true));
111116

112-
MoveRealCursor(0, ScrY - (Global->Opt->ShowKeyBar? 1 : 0));
117+
MoveRealCursor(0, YPos);
113118

114119
command(Command);
115120

far/vbuild.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6726
1+
6727

0 commit comments

Comments
 (0)