Natools

Check-in [fc581ebd8d]
Login
Overview
Comment:s_expressions-printers-pretty: fix Fit_In_Line width test
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: fc581ebd8d25bca1a9d6f1491745ed6f0543fce2
User & Date: nat on 2014-07-24 18:59:44
Other Links: manifest | tags
Context
2014-07-25
20:07
s_expressions-printers-pretty: add an assert on final cursor position after writing quoted strings check-in: e66be760b0 user: nat tags: trunk
2014-07-24
18:59
s_expressions-printers-pretty: fix Fit_In_Line width test check-in: fc581ebd8d user: nat tags: trunk
2014-07-23
20:16
s_expressions-printers-pretty-tests: add a test for expression width computations check-in: 2805404e82 user: nat tags: trunk
Changes

Modified src/natools-s_expressions-printers-pretty.adb from [e42a3a55bf] to [11731ef9d6].

98
99
100
101
102
103
104
105

106
107
108
109
110
111
112
98
99
100
101
102
103
104

105
106
107
108
109
110
111
112







-
+








   function Fit_In_Line
     (Output : in Printer;
      Width  : in Screen_Offset)
      return Boolean is
   begin
      return Output.Param.Width = 0
        or Output.Param.Width >= Output.Cursor + Width;
        or Output.Param.Width >= Output.Cursor - 1 + Width;
   end Fit_In_Line;


   function Indent_Width (Output : in Printer) return Screen_Offset is
   begin
      if Output.Indent_Level > 0 and Output.Param.Indentation > 0 then
         case Output.Param.Indent is