ObjFW  Check-in [1c2fe75e6e]

Overview
Comment:OFStdIOStream: Add special case for column 0

Use "\r" instead of the ANSI escape code if the column is 0.

This fixes the output of the tests on 3DS.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | trunk
Files: files | file ages | folders
SHA3-256: 1c2fe75e6e800d67ccc668533578dd5d015254f38c7998d137a1fe5f95a8868f
User & Date: js on 2024-05-05 19:04:03
Other Links: manifest | tags
Context
2024-05-05
19:04
OFStdIOStream: Add special case for column 0 Leaf check-in: 1c2fe75e6e user: js tags: trunk
12:33
Make OF_APPLICATION_DELEGATE() work with -mwindows check-in: dcea3bad47 user: js tags: trunk
Changes

Modified src/OFStdIOStream.m from [2edbd17f16] to [4854e57444].

641
642
643
644
645
646
647



648
649
650
651
652
653
654
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657







+
+
+







{
	if (!self.hasTerminal)
		return;

#ifdef OF_MSDOS
	gotoxy(column + 1, wherey());
#else
	if (column == 0)
		[self writeString: @"\r"];
	else
	[self writeFormat: @"\033[%uG", column + 1];
#endif
}

- (void)setCursorPosition: (OFPoint)position
{
	if (position.x < 0 || position.y < 0)