Subversion Repositories SvarDOS

Rev

Rev 1435 | Rev 1437 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1435 Rev 1436
Line 76... Line 76...
76
  unsigned short xoffset;
76
  unsigned short xoffset;
77
  unsigned short cursorposx;
77
  unsigned short cursorposx;
78
  unsigned short cursorposy;
78
  unsigned short cursorposy;
79
  unsigned short totlines;
79
  unsigned short totlines;
80
  unsigned short curline;
80
  unsigned short curline;
-
 
81
  unsigned short curline_prev;
81
  char lfonly;   /* set if line endings are LF (CR/LF otherwise) */
82
  char lfonly;   /* set if line endings are LF (CR/LF otherwise) */
82
  char modflag;  /* non-zero if file has been modified since last save */
83
  char modflag;  /* non-zero if file has been modified since last save */
83
  char modflagprev;
84
  char modflagprev;
84
  char fname[128];
85
  char fname[128];
85
};
86
};
Line 256... Line 257...
256
    const char *eoltype = "CRLF";
257
    const char *eoltype = "CRLF";
257
    if (db->lfonly) eoltype += 2;
258
    if (db->lfonly) eoltype += 2;
258
    mdr_cout_str(screenlastrow, helpcol - 6, eoltype, SCHEME_STBAR1, 5);
259
    mdr_cout_str(screenlastrow, helpcol - 6, eoltype, SCHEME_STBAR1, 5);
259
  }
260
  }
260
 
261
 
-
 
262
  /* line number */
-
 
263
  {
-
 
264
    unsigned short x = 1 + db->curline;
-
 
265
    unsigned short coloffset = 9;
-
 
266
    do {
-
 
267
      mdr_cout_char(screenlastrow, helpcol - coloffset, '0' + (x % 10), SCHEME_STBAR1);
-
 
268
      x /= 10;
-
 
269
      coloffset++;
-
 
270
    } while (x);
-
 
271
  }
-
 
272
 
261
  mdr_cout_str(screenlastrow, helpcol, s, SCHEME_STBAR2, 40);
273
  mdr_cout_str(screenlastrow, helpcol, s, SCHEME_STBAR2, 40);
262
}
274
}
263
 
275
 
264
 
276
 
265
static void ui_msg(const char *msg1, const char *msg2, unsigned char attr) {
277
static void ui_msg(const char *msg1, const char *msg2, unsigned char attr) {
Line 950... Line 962...
950
    check_cursor_not_after_eol(db);
962
    check_cursor_not_after_eol(db);
951
    mdr_cout_locate(db->cursorposy, db->cursorposx);
963
    mdr_cout_locate(db->cursorposy, db->cursorposx);
952
 
964
 
953
    ui_refresh(db);
965
    ui_refresh(db);
954
 
966
 
955
    if ((uidirty.statusbar != 0) || (db->modflagprev != db->modflag)) {
967
    if ((uidirty.statusbar != 0) || (db->modflagprev != db->modflag) || (db->curline_prev != db->curline)) {
956
      ui_statusbar(db, curfile);
968
      ui_statusbar(db, curfile);
957
      uidirty.statusbar = 0;
969
      uidirty.statusbar = 0;
958
      db->modflagprev = db->modflag;
970
      db->modflagprev = db->modflag;
-
 
971
      db->curline_prev = db->curline;
959
    }
972
    }
960
#ifdef DBG_LINENUM
973
#ifdef DBG_LINENUM
961
      {
974
      {
962
        char ddd[10];
975
        char ddd[10];
963
        db->curline += 1;
976
        db->curline += 1;