Enlightenment CVS committal

Author  : codewarrior
Project : e17
Module  : proto

Dir     : e17/proto/enterminus/src/bin


Modified Files:
        term.c term.h ui.c 


Log Message:
fixed cursor movement for left / right arrow presses
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/enterminus/src/bin/term.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- term.c      23 Feb 2005 13:17:59 -0000      1.12
+++ term.c      24 Feb 2005 00:27:54 -0000      1.13
@@ -33,6 +33,11 @@
    if(term->tcanvas->cur_col > term->tcanvas->cols) {
       term->tcanvas->cur_col = 0;
       term->tcanvas->cur_row++;
+      
+      term->cur_row++;
+      if(term->cur_row > term->tcanvas->rows-1)
+       term->cur_row = term->tcanvas->rows-1;
+      
       for(j = 0; j <= term->tcanvas->cols; j++) {
         gl = & term->tcanvas->grid[j + (term->tcanvas->cols * 
term->tcanvas->cur_row)];
         gl->c = ' ';
@@ -76,6 +81,10 @@
          case '\n': /* newline */
            term->tcanvas->cur_col = 0;
            term->tcanvas->cur_row++;
+           term->cur_row++;
+           if(term->cur_row > term->tcanvas->rows-1)
+             term->cur_row = term->tcanvas->rows-1;
+           
            /* TODO: Remember to scroll */
            
              {
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/enterminus/src/bin/term.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- term.h      23 Feb 2005 11:25:14 -0000      1.9
+++ term.h      24 Feb 2005 00:27:54 -0000      1.10
@@ -130,6 +130,8 @@
    char         *title;
    int           w;
    int           h;
+   int           cur_col;
+   int           cur_row;
 };
 
 typedef struct _Term Term;
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/enterminus/src/bin/ui.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- ui.c        23 Feb 2005 13:17:59 -0000      1.17
+++ ui.c        24 Feb 2005 00:27:54 -0000      1.18
@@ -130,14 +130,15 @@
       if(i + term->tcanvas->scroll_region_start > (term->tcanvas->rows - 
1)*term->tcanvas->scroll_size) {
         ig++;
       }         
-     
+           
       i2++;
       term->tcanvas->changed_rows[i] = 0;
-   }   
-   /* display cursor, note: this is still sort of a hack */      
+   } 
+   
+   /* display cursor, note: this is still sort of a hack */
    evas_object_move(term->cursor.shape, 
-                      term->tcanvas->cur_col*term->font.width, 
-                      
(term->tcanvas->cur_row%term->tcanvas->rows)*term->font.height);
+                   term->tcanvas->cur_col*term->font.width, 
+                   term->cur_row*term->font.height);
 }
 
 /* Move cursor up n rows*/




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to