Skip to content

Commit

Permalink
Use default background color to erase on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
aycabta committed Oct 3, 2021
1 parent 1c6c0c8 commit 852e855
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/reline/windows.rb
Expand Up @@ -325,10 +325,11 @@ def self.move_cursor_down(val)
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)
Expand Down

0 comments on commit 852e855

Please sign in to comment.