changed ln_s to pad
This commit is contained in:
parent
37b85a90f5
commit
a2bfacedba
12
ste.c
12
ste.c
@ -29,7 +29,7 @@ struct term {
|
|||||||
} dim;
|
} dim;
|
||||||
|
|
||||||
char statusbar[30];
|
char statusbar[30];
|
||||||
int ln_s;
|
int pad;
|
||||||
} t;
|
} t;
|
||||||
|
|
||||||
/* Row structure, defines actual and
|
/* Row structure, defines actual and
|
||||||
@ -156,8 +156,8 @@ void termInit (void)
|
|||||||
/* Populate the main data structure */
|
/* Populate the main data structure */
|
||||||
getmaxyx(stdscr, t.dim.y, t.dim.x);
|
getmaxyx(stdscr, t.dim.y, t.dim.x);
|
||||||
t.dim.y -= 1;
|
t.dim.y -= 1;
|
||||||
t.ln_s = getLineNumberSize();
|
t.pad = getLineNumberSize();
|
||||||
t.dim.x -= t.ln_s + 1;
|
t.dim.x -= t.pad + 1;
|
||||||
|
|
||||||
/* Initialize the data staructure */
|
/* Initialize the data staructure */
|
||||||
t.cur.x = t.cur.off_x = 0;
|
t.cur.x = t.cur.off_x = 0;
|
||||||
@ -237,7 +237,7 @@ void drawLines (void)
|
|||||||
/* Move avoiding the space allocated for line numbers */
|
/* Move avoiding the space allocated for line numbers */
|
||||||
void lnMove (int y, int x)
|
void lnMove (int y, int x)
|
||||||
{
|
{
|
||||||
x += t.ln_s;
|
x += t.pad;
|
||||||
move(y, x);
|
move(y, x);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -251,12 +251,12 @@ void drawBar (char *s)
|
|||||||
/* Print the message */
|
/* Print the message */
|
||||||
mvprintw(t.dim.y, 0, s);
|
mvprintw(t.dim.y, 0, s);
|
||||||
/* Fill everything else with spaces */
|
/* Fill everything else with spaces */
|
||||||
for (int i = len; i <= t.dim.x + t.ln_s; i++)
|
for (int i = len; i <= t.dim.x + t.pad; i++)
|
||||||
mvaddch(t.dim.y, i, ' ');
|
mvaddch(t.dim.y, i, ' ');
|
||||||
|
|
||||||
char m[10];
|
char m[10];
|
||||||
sprintf(m, "Zoom:\t%c", whatsThat());
|
sprintf(m, "Zoom:\t%c", whatsThat());
|
||||||
mvaddstr(t.dim.y, t.dim.x + t.ln_s - strlen(m), m);
|
mvaddstr(t.dim.y, t.dim.x + t.pad - strlen(m), m);
|
||||||
|
|
||||||
/* Return to normal contrast mode */
|
/* Return to normal contrast mode */
|
||||||
attroff(A_STANDOUT);
|
attroff(A_STANDOUT);
|
||||||
|
Loading…
Reference in New Issue
Block a user