Style fixes.
This commit is contained in:
@@ -67,7 +67,8 @@ TermView::Draw(BRect updateRect)
|
|||||||
for (pos.row = updatedChars.start_row; pos.row <= updatedChars.end_row;
|
for (pos.row = updatedChars.start_row; pos.row <= updatedChars.end_row;
|
||||||
pos.row++) {
|
pos.row++) {
|
||||||
int x = updatedChars.start_col * fFontWidth + kBorderSpacing;
|
int x = updatedChars.start_col * fFontWidth + kBorderSpacing;
|
||||||
int y = pos.row * fFontHeight + (int)ceil(height.ascent) + kBorderSpacing;
|
int y = pos.row * fFontHeight + (int)ceil(height.ascent)
|
||||||
|
+ kBorderSpacing;
|
||||||
MovePenTo(x, y);
|
MovePenTo(x, y);
|
||||||
|
|
||||||
for (pos.col = updatedChars.start_col;
|
for (pos.col = updatedChars.start_col;
|
||||||
@@ -143,8 +144,7 @@ void
|
|||||||
TermView::KeyDown(const char* bytes, int32 numBytes)
|
TermView::KeyDown(const char* bytes, int32 numBytes)
|
||||||
{
|
{
|
||||||
// Translate some keys to more usual VT100 escape codes
|
// Translate some keys to more usual VT100 escape codes
|
||||||
switch(bytes[0])
|
switch (bytes[0]) {
|
||||||
{
|
|
||||||
case B_UP_ARROW:
|
case B_UP_ARROW:
|
||||||
numBytes = 3;
|
numBytes = 3;
|
||||||
bytes = "\x1B[A";
|
bytes = "\x1B[A";
|
||||||
@@ -308,7 +308,8 @@ TermView::_GetCell(VTermPos pos, VTermScreenCell& cell)
|
|||||||
// Try the scroll-back buffer
|
// Try the scroll-back buffer
|
||||||
if (pos.row < 0 && pos.col >= 0) {
|
if (pos.row < 0 && pos.col >= 0) {
|
||||||
int offset = - pos.row - 1;
|
int offset = - pos.row - 1;
|
||||||
ScrollBufferItem* line = (ScrollBufferItem*)fScrollBuffer.ItemAt(offset);
|
ScrollBufferItem* line
|
||||||
|
= (ScrollBufferItem*)fScrollBuffer.ItemAt(offset);
|
||||||
if (line != NULL && pos.col < line->cols) {
|
if (line != NULL && pos.col < line->cols) {
|
||||||
cell = line->cells[pos.col];
|
cell = line->cells[pos.col];
|
||||||
return;
|
return;
|
||||||
@@ -378,7 +379,8 @@ TermView::_PushLine(int cols, const VTermScreenCell* cells)
|
|||||||
|
|
||||||
BScrollBar* scrollBar = ScrollBar(B_VERTICAL);
|
BScrollBar* scrollBar = ScrollBar(B_VERTICAL);
|
||||||
if (scrollBar != NULL) {
|
if (scrollBar != NULL) {
|
||||||
float range = (fScrollBuffer.CountItems() + availableRows) * fFontHeight;
|
float range = (fScrollBuffer.CountItems() + availableRows)
|
||||||
|
* fFontHeight;
|
||||||
scrollBar->SetRange(availableRows * fFontHeight - range, 0.0f);
|
scrollBar->SetRange(availableRows * fFontHeight - range, 0.0f);
|
||||||
// TODO we need to adjust this in FrameResized, as availableRows can
|
// TODO we need to adjust this in FrameResized, as availableRows can
|
||||||
// change
|
// change
|
||||||
|
|||||||
Reference in New Issue
Block a user