aboutsummaryrefslogtreecommitdiff
path: root/render.f90
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2021-04-19 09:36:21 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2021-04-19 09:36:21 -0400
commitc4274b0bb964f4e965d10cbc2b137a0bfc9c9ebf (patch)
treebaefc0578dda240eb1c12e36076928da0b48e426 /render.f90
parent313ea185e0b3e43b5d464cbce4ccf2db953e4da7 (diff)
downloadLR-87-c4274b0bb964f4e965d10cbc2b137a0bfc9c9ebf.tar.gz
LR-87-c4274b0bb964f4e965d10cbc2b137a0bfc9c9ebf.zip
Fixed rendering of single-character lines
Diffstat (limited to 'render.f90')
-rw-r--r--render.f906
1 files changed, 4 insertions, 2 deletions
diff --git a/render.f90 b/render.f90
index f5c1358..bc77c4d 100644
--- a/render.f90
+++ b/render.f90
@@ -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)