489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
|
if (!isatty(_fd))
return;
[self writeFormat: @"\033[%uG", column + 1];
#endif
}
- (void)setCursorPosition: (of_point_t)position
{
if (position.x < 0 || position.y < 0)
@throw [OFInvalidArgumentException exception];
#ifdef HAVE_ISATTY
if (!isatty(_fd))
return;
[self writeFormat: @"\033[%u;%uH",
(unsigned)position.y + 1, (unsigned)position.x + 1];
#endif
}
- (void)setRelativeCursorPosition: (of_point_t)position
{
#ifdef HAVE_ISATTY
if (!isatty(_fd))
return;
if (position.x > 0)
[self writeFormat: @"\033[%uC", (unsigned)position.x];
|
|
|
|
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
|
if (!isatty(_fd))
return;
[self writeFormat: @"\033[%uG", column + 1];
#endif
}
- (void)setCursorPosition: (OFPoint)position
{
if (position.x < 0 || position.y < 0)
@throw [OFInvalidArgumentException exception];
#ifdef HAVE_ISATTY
if (!isatty(_fd))
return;
[self writeFormat: @"\033[%u;%uH",
(unsigned)position.y + 1, (unsigned)position.x + 1];
#endif
}
- (void)setRelativeCursorPosition: (OFPoint)position
{
#ifdef HAVE_ISATTY
if (!isatty(_fd))
return;
if (position.x > 0)
[self writeFormat: @"\033[%uC", (unsigned)position.x];
|