64x128 Graphic LCD Library

Dependencies:   LCD_fonts

Fork of C12832_lcd by Peter Drescher

Revision:
10:269eddb2b7c5
Parent:
0:4bbc531be6e2
--- a/TextDisplay.cpp	Sat Oct 26 17:38:46 2013 +0000
+++ b/TextDisplay.cpp	Fri Nov 01 10:19:59 2013 +0000
@@ -18,7 +18,7 @@
     
 int TextDisplay::_putc(int value) {
     if(value == '\n') {
-        _column = 0;
+        _column = lastcol;
         _row++;
         if(_row >= rows()) {
             _row = 0;
@@ -27,7 +27,7 @@
         character(_column, _row, value);
         _column++;
         if(_column >= columns()) {
-            _column = 0;
+            _column = lastcol;
             _row++;
             if(_row >= rows()) {
                 _row = 0;
@@ -48,6 +48,7 @@
 void TextDisplay::locate(int column, int row) {
     _column = column;
     _row = row;
+    lastcol = column;
 }
 
 int TextDisplay::_getc() {
@@ -75,3 +76,4 @@
     setvbuf(stdout, NULL, _IOLBF, columns());
     return true;
 } 
+