Fix hard line break at end of text frame.
Fix hard line break at end of text frame.


Index: pyglet/layout/gl/device.py
===================================================================
--- pyglet/layout/gl/device.py	(revision 687)
+++ pyglet/layout/gl/device.py	(working copy)
@@ -329,6 +329,9 @@

         frame.strip_next = self.text[-1] == ' '
         frame.soft_break = self.text[-1] == ' '
+        if self.text[-1] == '\n':
+            frame.line_break = True
+            frame.to_index -= 1
         frame.border_edge_width += content_right
         self.flow_dirty = False

oktayacikalin/pyglet,oktayacikalin/pyglet,theblacklion/pyglet,mammadori/pyglet,mammadori/pyglet,theblacklion/pyglet,mammadori/pyglet,theblacklion/pyglet,oktayacikalin/pyglet,mammadori/pyglet,oktayacikalin/pyglet,oktayacikalin/pyglet,theblacklion/pyglet,theblacklion/pyglet