mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
Fix cursor position calculation.
Submitted by: Cejka Rudolf <cejkar@dcse.fee.vutbr.cz>
This commit is contained in:
parent
ad1720d30c
commit
7d09323f2d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=54144
@ -2946,11 +2946,12 @@ ansi_put(scr_stat *scp, u_char *buf, int len)
|
||||
case 0x09: /* non-destructive tab */
|
||||
mark_for_update(scp, scp->cursor_pos);
|
||||
scp->cursor_pos += (8 - scp->xpos % 8u);
|
||||
mark_for_update(scp, scp->cursor_pos);
|
||||
if ((scp->xpos += (8 - scp->xpos % 8u)) >= scp->xsize) {
|
||||
scp->xpos = 0;
|
||||
scp->ypos++;
|
||||
scp->cursor_pos = scp->xsize * scp->ypos;
|
||||
}
|
||||
mark_for_update(scp, scp->cursor_pos);
|
||||
break;
|
||||
|
||||
case 0x0a: /* newline, same pos */
|
||||
|
Loading…
Reference in New Issue
Block a user