Make do_cursorpos() use xpt() instead of just current_x which is inaccurate

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1091 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Chris Allegretta 2002-03-01 02:25:35 +00:00
parent 6f746000c0
commit 5f87021c08
1 changed files with 3 additions and 3 deletions

View File

@ -1602,7 +1602,7 @@ int do_cursorpos(int constant)
if (strlen(current->data) == 0) if (strlen(current->data) == 0)
colpct = 0; colpct = 0;
else else
colpct = 100 * current_x / strlen(current->data); colpct = 100 * xplustabs() / xpt(current, strlen(current->data));
for (fileptr = fileage; fileptr != current && fileptr != NULL; for (fileptr = fileage; fileptr != current && fileptr != NULL;
fileptr = fileptr->next) fileptr = fileptr->next)
@ -1632,8 +1632,8 @@ int do_cursorpos(int constant)
if (!constant || (old_i != i || old_totsize != totsize)) { if (!constant || (old_i != i || old_totsize != totsize)) {
statusbar(_ statusbar(_
("line %d/%d (%.0f%%), col %ld/%ld (%.0f%%), char %ld/%ld (%.0f%%)"), ("line %d/%d (%.0f%%), col %ld/%ld (%.0f%%), char %ld/%ld (%.0f%%)"),
current->lineno, totlines, linepct, current_x, current->lineno, totlines, linepct, xplustabs(),
strlen(current->data), colpct, i, j, bytepct); xpt(current, strlen(current->data)), colpct, i, j, bytepct);
} }
old_i = i; old_i = i;