improve visual clarity
This commit is contained in:
6
disp.cc
6
disp.cc
@@ -24,7 +24,7 @@ clearRows(int startingRow, int endingRow)
|
||||
|
||||
// display a file using ncurses
|
||||
int
|
||||
displayFile(string path, int startLineNum = 0, int numLines = 10)
|
||||
displayFile(string path, int startLineNum = 0, int numLines = height - 10)
|
||||
{
|
||||
ifstream file(path);
|
||||
if (!file) {
|
||||
@@ -41,14 +41,14 @@ displayFile(string path, int startLineNum = 0, int numLines = 10)
|
||||
// line number isn't too high
|
||||
{
|
||||
if (num >= startLineNum) {
|
||||
move(lineNum, 0);
|
||||
move(lineNum, 2);
|
||||
printw("%s", line.c_str());
|
||||
lineNum++; // increment the row number after
|
||||
// printing each line
|
||||
}
|
||||
num++;
|
||||
}
|
||||
move(DEFAULT_CUR_Y, DEFAULT_CUR_X);
|
||||
movetobox();
|
||||
refresh();
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user