mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-29 08:03:19 +03:00
- winio.c:do_cursorpos() - Make col numbering start from 1 (suggested by Andrew Ho)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1155 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
e373909037
commit
f3a07b2d7e
@ -53,6 +53,8 @@ CVS code -
|
||||
- winio.c:
|
||||
do_credits()
|
||||
- Add Thomas Dickey.
|
||||
do_cursorpos()
|
||||
- Make col numbering start from 1 (suggested by Andrew Ho).
|
||||
update_line(), xpt()
|
||||
- Add check for 127 (DLR).
|
||||
- po/sv.po:
|
||||
|
9
winio.c
9
winio.c
@ -1607,10 +1607,7 @@ int do_cursorpos(int constant)
|
||||
if (old_totsize == -1)
|
||||
old_totsize = totsize;
|
||||
|
||||
if (strlen(current->data) == 0)
|
||||
colpct = 0;
|
||||
else
|
||||
colpct = 100 * xplustabs() / xpt(current, strlen(current->data));
|
||||
colpct = 100 * (xplustabs() + 1) / (xpt(current, strlen(current->data)) + 1);
|
||||
|
||||
for (fileptr = fileage; fileptr != current && fileptr != NULL;
|
||||
fileptr = fileptr->next)
|
||||
@ -1640,8 +1637,8 @@ int do_cursorpos(int constant)
|
||||
if (!constant || (old_i != i || old_totsize != totsize)) {
|
||||
statusbar(_
|
||||
("line %d/%d (%.0f%%), col %ld/%ld (%.0f%%), char %ld/%ld (%.0f%%)"),
|
||||
current->lineno, totlines, linepct, xplustabs(),
|
||||
xpt(current, strlen(current->data)), colpct, i, j, bytepct);
|
||||
current->lineno, totlines, linepct, xplustabs() + 1,
|
||||
xpt(current, strlen(current->data)) + 1, colpct, i, j, bytepct);
|
||||
}
|
||||
|
||||
old_i = i;
|
||||
|
Loading…
Reference in New Issue
Block a user