mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/reline] Use default background color to erase on Windows
https://github.com/ruby/reline/commit/852e855d82
This commit is contained in:
parent
dc9112cf10
commit
1e9714cf34
1 changed files with 2 additions and 1 deletions
|
@ -325,10 +325,11 @@ class Reline::Windows
|
|||
def self.erase_after_cursor
|
||||
csbi = 0.chr * 24
|
||||
@@GetConsoleScreenBufferInfo.call(@@hConsoleHandle, csbi)
|
||||
attributes = csbi[8, 2].unpack1('S')
|
||||
cursor = csbi[4, 4].unpack1('L')
|
||||
written = 0.chr * 4
|
||||
@@FillConsoleOutputCharacter.call(@@hConsoleHandle, 0x20, get_screen_size.last - cursor_pos.x, cursor, written)
|
||||
@@FillConsoleOutputAttribute.call(@@hConsoleHandle, 0, get_screen_size.last - cursor_pos.x, cursor, written)
|
||||
@@FillConsoleOutputAttribute.call(@@hConsoleHandle, attributes, get_screen_size.last - cursor_pos.x, cursor, written)
|
||||
end
|
||||
|
||||
def self.scroll_down(val)
|
||||
|
|
Loading…
Add table
Reference in a new issue