Changeset a556caa for global.c


Ignore:
Timestamp:
Jul 11, 2009, 1:14:24 PM (15 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
bd1a1ae
Parents:
a45786e
git-author:
Karl Ramm <kcr@1ts.org> (07/07/09 23:03:19)
git-committer:
Nelson Elhage <nelhage@mit.edu> (07/11/09 13:14:24)
Message:
Mostly refactor the editwin to use a linear buffer position.

Use a linear buffer positino to keep track of the point, rather than
(x, y).

In addition, make the editwin structure private to editwin.c. (No
abstraction violation for you!)

Add some abstractions for pointer movement, and use them in some places.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • global.c

    rbd783db ra556caa  
    4747  g->rightshift=0;
    4848
    49   owl_editwin_init(&(g->tw), NULL, owl_global_get_typwin_lines(g), g->cols, OWL_EDITWIN_STYLE_ONELINE, NULL);
     49  g->tw = owl_editwin_allocate();
     50  owl_editwin_init(g->tw, NULL, owl_global_get_typwin_lines(g), g->cols, OWL_EDITWIN_STYLE_ONELINE, NULL);
    5051
    5152  owl_keyhandler_init(&g->kh);
     
    147148  g->typwin=newwin(typwin_lines, cols, g->recwinlines+2, 0);
    148149
    149   owl_editwin_set_curswin(&(g->tw), g->typwin, typwin_lines, g->cols);
     150  owl_editwin_set_curswin(g->tw, g->typwin, typwin_lines, g->cols);
    150151
    151152  idlok(g->typwin, FALSE);
     
    261262
    262263owl_editwin *owl_global_get_typwin(owl_global *g) {
    263   return(&(g->tw));
     264  return(g->tw);
    264265}
    265266
     
    478479  owl_mainwin_redisplay(&(g->mw));
    479480  sepbar(NULL);
    480   owl_editwin_redisplay(&(g->tw), 0);
     481  owl_editwin_redisplay(g->tw, 0);
    481482  owl_function_full_redisplay(&g);
    482483
Note: See TracChangeset for help on using the changeset viewer.