+ // Update cursor
+ if( term == gpVT_CurTerm && !(term->Flags & VT_FLAG_HIDECSR) )
+ {
+ tVideo_IOCtl_Pos csr_pos;
+ int offset;
+
+ if(term->Flags & VT_FLAG_ALTBUF)
+ offset = term->AltWritePos;
+ else
+ offset = term->WritePos - term->ViewPos;
+
+ csr_pos.x = offset % term->TextWidth;
+ csr_pos.y = offset / term->TextWidth;
+ if( 0 <= csr_pos.y && csr_pos.y < term->TextHeight )
+ VFS_IOCtl(giVT_OutputDevHandle, VIDEO_IOCTL_SETCURSOR, &csr_pos);
+ }
+