@@ -595,6 +595,9 @@ def _insert_fullchar_at(self, row, col, c, attr):
595
595
else :
596
596
therow .end = col
597
597
self ._redraw_row (col - 1 , row )
598
+ if therow .wrap and therow .end == self .mode .width :
599
+ self .scroll_down (row + 1 )
600
+ therow .wrap = True
598
601
return True
599
602
else :
600
603
# pushing the end of the row past the screen edge
@@ -627,6 +630,7 @@ def line_feed(self):
627
630
# adjust end of line and wrapping flag - LF connects lines like word wrap
628
631
self .text .pages [self .apagenum ].row [self .current_row - 1 ].end = self .current_col - 1
629
632
self .text .pages [self .apagenum ].row [self .current_row - 1 ].wrap = True
633
+ # cursor stays in place after line feed!
630
634
else :
631
635
# find last row in logical line
632
636
end = self .text .find_end_of_line (self .apagenum , self .current_row )
@@ -641,8 +645,13 @@ def line_feed(self):
641
645
# self.current_row has changed, don't use row var
642
646
if self .current_row < self .mode .height :
643
647
self .scroll_down (self .current_row + 1 )
644
- self .text .pages [self .apagenum ].row [self .current_row ].wrap = True
645
- # cursor stays in place after line feed!
648
+ # if we were already a wrapping row, make sure the new empty row wraps
649
+ #if self.text.pages[self.apagenum].row[self.current_row-1].wrap:
650
+ # self.text.pages[self.apagenum].row[self.current_row].wrap = True
651
+ # ensure the current row now wraps
652
+ self .text .pages [self .apagenum ].row [self .current_row - 1 ].wrap = True
653
+ # cursor moves to start of next line
654
+ self .set_pos (self .current_row + 1 , 1 )
646
655
647
656
###########################################################################
648
657
# vpage text retrieval
0 commit comments