fixes #243 Ordering of SetConsoleWindowInfo and SetConsoleScreenBufferSize

This commit is contained in:
Garrett D'Amore 2019-03-19 00:22:32 -07:00
parent 2fca0432ba
commit 48f88019c3
1 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
// +build windows
// Copyright 2016 The TCell Authors
// Copyright 2019 The TCell Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use file except in compliance with the License.
@ -788,7 +788,7 @@ func (s *cScreen) draw() {
wcs = append(wcs, utf16.Encode(combc)...)
}
for dx := 0; dx < width; dx++ {
s.cells.SetDirty(x + dx, y, false)
s.cells.SetDirty(x+dx, y, false)
}
x += width - 1
}
@ -882,14 +882,14 @@ func (s *cScreen) resize() {
s.w = w
s.h = h
s.setBufferSize(w, h)
r := rect{0, 0, int16(w - 1), int16(h - 1)}
procSetConsoleWindowInfo.Call(
uintptr(s.out),
uintptr(1),
uintptr(unsafe.Pointer(&r)))
s.setBufferSize(w, h)
s.PostEvent(NewEventResize(w, h))
}