Subversion Repositories SvarDOS

Rev

Rev 1333 | Rev 1335 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1333 Rev 1334
Line 40... Line 40...
40
/*****************************************************************************
40
/*****************************************************************************
41
 * global variables and definitions                                          *
41
 * global variables and definitions                                          *
42
 *****************************************************************************/
42
 *****************************************************************************/
43
 
43
 
44
/* preload the mono scheme (to be overloaded at runtime if color adapter present) */
44
/* preload the mono scheme (to be overloaded at runtime if color adapter present) */
45
// 11 524
-
 
46
static unsigned char SCHEME_TEXT   = 0x07,
45
static unsigned char SCHEME_TEXT   = 0x07,
47
                     SCHEME_STBAR1 = 0x70,
46
                     SCHEME_STBAR1 = 0x70,
48
                     SCHEME_STBAR2 = 0x70,
47
                     SCHEME_STBAR2 = 0x70,
49
                     SCHEME_STBAR3 = 0xf0,
48
                     SCHEME_STBAR3 = 0xf0,
50
                     SCHEME_SCROLL = 0x70,
49
                     SCHEME_SCROLL = 0x70,
Line 736... Line 735...
736
 
735
 
737
    } else if (k == 0x14B) { /* left */
736
    } else if (k == 0x14B) { /* left */
738
      cursor_left(db);
737
      cursor_left(db);
739
 
738
 
740
    } else if (k == 0x149) { /* pgup */
739
    } else if (k == 0x149) { /* pgup */
-
 
740
      unsigned char dist = db->cursorposy + screenh - 1;
-
 
741
      while ((dist != 0) && (db->cursor->prev != NULL)) {
-
 
742
        db->cursor = db->cursor->prev;
-
 
743
        dist--;
-
 
744
      }
-
 
745
      if (dist != 0) {
-
 
746
        db->cursorposy = 0;
-
 
747
        db->cursorposx = 0;
741
      // TODO
748
      } else {
-
 
749
        dist = db->cursorposy;
-
 
750
        while ((dist--) && (db->cursor->next)) db->cursor = db->cursor->next;
-
 
751
      }
-
 
752
      uidirty.from = 0;
-
 
753
      uidirty.to = 0xff;
742
 
754
 
743
    } else if (k == 0x151) { /* pgdown */
755
    } else if (k == 0x151) { /* pgdown */
-
 
756
      unsigned char dist = screenh + screenh - db->cursorposy - 3;
-
 
757
      while ((dist != 0) && (db->cursor->next != NULL)) {
-
 
758
        db->cursor = db->cursor->next;
-
 
759
        dist--;
-
 
760
      }
-
 
761
      if (dist != 0) {
-
 
762
        db->cursorposy = screenh - 2;
-
 
763
        if (db->totlines <= db->cursorposy) db->cursorposy = db->totlines - 1;
-
 
764
        db->cursorposx = 0;
744
      // TODO
765
      } else {
-
 
766
        dist = screenh - 2 - db->cursorposy;
-
 
767
        while ((dist--) && (db->cursor->prev)) db->cursor = db->cursor->prev;
-
 
768
      }
-
 
769
      uidirty.from = 0;
-
 
770
      uidirty.to = 0xff;
745
 
771
 
746
    } else if (k == 0x147) { /* home */
772
    } else if (k == 0x147) { /* home */
747
       cursor_home(db);
773
       cursor_home(db);
748
 
774
 
749
    } else if (k == 0x14F) { /* end */
775
    } else if (k == 0x14F) { /* end */