Differences From Artifact [e858dfbb7a]:
- File src/natools-s_expressions-printers-pretty.adb — part of check-in [8fffe1590c] at 2014-07-27 17:32:51 on branch trunk — s_expressions-printers-pretty: fix cursor position after writing a quoted string (user: nat size: 36617)
To Artifact [bf089f67f2]:
- File src/natools-s_expressions-printers-pretty.adb — part of check-in [ce1e6e8edb] at 2014-07-28 20:18:16 on branch trunk — s_expressions-printers-pretty: fix cursor position after two-byte newlines in quoted strings (user: nat size: 36791)
| ︙ | |||
353 354 355 356 357 358 359 360 361 362 363 364 365 366 | 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 | + |
Width_Adjust := -Offset (Cursor);
case Newline is
when LF | CR =>
Output_Delta := 1;
when CR_LF | LF_CR =>
Output_Delta := 2;
Input_Delta := 2;
Width_Adjust := Width_Adjust - 1;
end case;
end if;
when 0 .. 7 | 14 .. 31 =>
Output_Delta := 4;
when 16#80# .. 16#FF# =>
case Encoding is
when ASCII =>
|
| ︙ | |||
646 647 648 649 650 651 652 653 654 655 656 657 658 659 | 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 | + |
Width_Adjust := -Offset (Output.Cursor);
if Output.Param.Newline = CR_LF
or Output.Param.Newline = LF_CR
then
Input_Delta := 2;
Result (O + 1) := Data (I + 1);
Output_Delta := 2;
Width_Adjust := Width_Adjust - 1;
end if;
end if;
when 11 =>
Result (O) := Encodings.Escape;
Result (O + 1) := Character'Pos ('v');
Output_Delta := 2;
when 12 =>
|
| ︙ | |||
673 674 675 676 677 678 679 680 681 682 683 684 685 686 | 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 | + |
Width_Adjust := -Offset (Output.Cursor);
if Output.Param.Newline = CR_LF
or Output.Param.Newline = LF_CR
then
Input_Delta := 2;
Result (O + 1) := Data (I + 1);
Output_Delta := 2;
Width_Adjust := Width_Adjust - 1;
end if;
end if;
when Encodings.Quoted_Atom_End | Encodings.Escape =>
Result (O) := Encodings.Escape;
Result (O + 1) := Data (I);
Output_Delta := 2;
when 0 .. 7 | 14 .. 31 =>
|
| ︙ |