Changeset 99e5526 in mainline
- Timestamp:
- 2009-09-16T20:19:22Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c29f20b
- Parents:
- b077886e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/edit/edit.c
rb077886e r99e5526 130 130 131 131 pane.rows = scr_rows - 1; 132 pane.columns = scr_columns; 132 133 pane.sh_row = 1; 134 pane.sh_column = 1; 133 135 134 136 /* Start with an empty sheet. */ … … 402 404 static void pane_row_range_display(int r0, int r1) 403 405 { 404 int width;405 406 int i, j, fill; 406 407 spt_t rb, re, dep; … … 415 416 console_goto(con, 0, 0); 416 417 for (i = r0; i < r1; ++i) { 417 sheet_get_row_width(&doc.sh, pane.sh_row + i, &width); 418 419 /* Determine row starting point. */ 420 rbc.row = pane.sh_row + i; rbc.column = 1; 418 /* Starting point for row display */ 419 rbc.row = pane.sh_row + i; 420 rbc.column = pane.sh_column; 421 421 sheet_get_cell_pt(&doc.sh, &rbc, dir_before, &rb); 422 422 423 /* Determine row ending point. */ 424 rec.row = pane.sh_row + i; rec.column = width + 1; 423 /* Ending point for row display */ 424 rec.row = pane.sh_row + i; 425 rec.column = pane.sh_column + pane.columns; 425 426 sheet_get_cell_pt(&doc.sh, &rec, dir_before, &re); 426 427 … … 494 495 495 496 spt_get_coord(&caret_pt, &coord); 496 console_goto(con, coord.column - 1, coord.row - pane.sh_row); 497 console_goto(con, coord.column - pane.sh_column, 498 coord.row - pane.sh_row); 497 499 } 498 500 … … 555 557 spt_get_coord(&pt, &coord); 556 558 557 /* Scroll pane as necessary. */559 /* Scroll pane vertically. */ 558 560 559 561 if (coord.row < pane.sh_row) { … … 561 563 pane.rflags |= REDRAW_TEXT; 562 564 } 565 563 566 if (coord.row > pane.sh_row + pane.rows - 1) { 564 567 pane.sh_row = coord.row - pane.rows + 1; … … 566 569 } 567 570 571 /* Scroll pane horizontally. */ 572 573 if (coord.column < pane.sh_column) { 574 pane.sh_column = coord.column; 575 pane.rflags |= REDRAW_TEXT; 576 } 577 578 if (coord.column > pane.sh_column + pane.columns - 1) { 579 pane.sh_column = coord.column - pane.columns + 1; 580 pane.rflags |= REDRAW_TEXT; 581 } 582 568 583 pane.rflags |= (REDRAW_CARET | REDRAW_STATUS); 569 570 584 } 571 585
Note:
See TracChangeset
for help on using the changeset viewer.