diff options
-rw-r--r-- | files.f90 | 2 | ||||
-rw-r--r-- | layout.f90 | 1 | ||||
-rw-r--r-- | main.F90 | 2 | ||||
-rw-r--r-- | render.f90 | 6 |
4 files changed, 7 insertions, 4 deletions
@@ -128,7 +128,7 @@ contains logical, intent(inout)::preformatted_on integer::line_length - + if(file_type == file_type_plain_text) then single_line%line_type = line_type_preformatted @@ -55,6 +55,7 @@ contains call rendering_engine%prepare_for_layout() do while(laying_out) + if(.not. associated(walker%breaks)) then select case (walker%line_type) @@ -127,7 +127,7 @@ implicit none current_url = " " first_line => null() - open(unit=io, form="formatted", status="scratch", access='stream') + open(unit=io, form="formatted", file="/tmp/scratch", access='stream') do while(running) @@ -410,6 +410,7 @@ contains allocate(breaks(1)) breaks(1) = len_trim(text) + do while(r%preformatted_width(text(1:breaks(1))) > r%max_width) breaks(1) = breaks(1) - 1 end do @@ -440,7 +441,8 @@ contains startpos = get_start_position_and_type(text, proportional_type) endpos = wrap_line(r, text, startpos, proportional_type) - do while(endpos > startpos) + + do while(endpos >= startpos) ! Save this break break_count = break_count + 1 @@ -521,7 +523,7 @@ contains endpos = len_trim(text) end if - do while(endpos > startpos) + do while(endpos >= startpos) if(r%is_text_visible(text(startpos:endpos))) then call r%draw_proportional(text(startpos:endpos), & text_type=proportional_type) |