File tree Expand file tree Collapse file tree 2 files changed +22
-12
lines changed
Expand file tree Collapse file tree 2 files changed +22
-12
lines changed Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<Project ToolsVersion =" 15.0" xmlns =" http://schemas.microsoft.com/developer/msbuild/2003" >
33 <PropertyGroup >
4- <VersionPrefix >1.4.0 </VersionPrefix >
4+ <VersionPrefix >1.4.1 </VersionPrefix >
55 <LangVersion >latest</LangVersion >
66
77 <Authors >Mayuki Sawatari</Authors >
Original file line number Diff line number Diff line change @@ -133,21 +133,31 @@ private void Render(string terminator)
133133 {
134134 lock ( Console . Out )
135135 {
136- var currentLeft = Console . CursorLeft ;
137- var currentTop = Console . CursorTop ;
138-
139- ConsoleHelper . ClearCurrentConsoleLine ( _lineLength , _enabled ? _cursorTop : currentTop ) ;
140- ConsoleHelper . WriteWithColor ( frame , Color ?? Console . ForegroundColor ) ;
141- Console . Write ( " " ) ;
142- Console . Write ( Text ) ;
143- _lineLength = Console . CursorLeft ; // get line length before write terminator
144- Console . Write ( terminator ) ;
145- Console . Out . Flush ( ) ;
146-
147136 if ( _enabled )
148137 {
138+ var currentLeft = Console . CursorLeft ;
139+ var currentTop = Console . CursorTop ;
140+
141+ ConsoleHelper . ClearCurrentConsoleLine ( _lineLength , _enabled ? _cursorTop : currentTop ) ;
142+ ConsoleHelper . WriteWithColor ( frame , Color ?? Console . ForegroundColor ) ;
143+ Console . Write ( " " ) ;
144+ Console . Write ( Text ) ;
145+ _lineLength = Console . CursorLeft ; // get line length before write terminator
146+ Console . Write ( terminator ) ;
147+ Console . Out . Flush ( ) ;
148+
149149 Console . SetCursorPosition ( currentLeft , currentTop ) ;
150150 }
151+ else
152+ {
153+
154+ ConsoleHelper . WriteWithColor ( frame , Color ?? Console . ForegroundColor ) ;
155+ Console . Write ( " " ) ;
156+ Console . Write ( Text ) ;
157+ _lineLength = frame . Length + 1 + Text . Length ;
158+ Console . Write ( terminator ) ;
159+ Console . Out . Flush ( ) ;
160+ }
151161 }
152162 }
153163 }
You can’t perform that action at this time.
0 commit comments