Changeset 38cc669 for functions.c


Ignore:
Timestamp:
Mar 23, 2010, 5:23:43 PM (14 years ago)
Author:
Nelson Elhage <nelhage@ksplice.com>
Branches:
master, release-1.10, release-1.6, release-1.7, release-1.8, release-1.9
Children:
0d17295
Parents:
8dfb59c
git-author:
Nelson Elhage <nelhage@mit.edu> (03/13/10 23:54:51)
git-committer:
Nelson Elhage <nelhage@ksplice.com> (03/23/10 17:23:43)
Message:
Create/destroy editwins rather than reusing a single one.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    r8dfb59c r38cc669  
    283283
    284284  /* create and setup the editwin */
     285  owl_global_set_typwin_active(&g, OWL_EDITWIN_STYLE_MULTILINE,
     286                               owl_global_get_msg_history(&g));
    285287  e = owl_global_get_typwin(&g);
    286   owl_editwin_new_style(e, OWL_EDITWIN_STYLE_MULTILINE,
    287                         owl_global_get_msg_history(&g));
    288   owl_editwin_clear(e);
    289288  owl_editwin_set_dotsend(e);
    290289  s = owl_sprintf("----> %s\n", line);
     
    292291  owl_free(s);
    293292
    294   /* make it active */
    295   owl_global_set_typwin_active(&g);
    296 
    297   owl_editwin_set_cbdata(owl_global_get_typwin(&g), data, cleanup);
    298   owl_editwin_set_callback(owl_global_get_typwin(&g), callback);
     293  owl_editwin_set_cbdata(e, data, cleanup);
     294  owl_editwin_set_callback(e, callback);
    299295  owl_global_push_context(&g, OWL_CTX_EDITMULTI, e, "editmulti");
    300296}
     
    19131909  owl_editwin *tw;
    19141910
     1911  owl_global_set_typwin_active(&g, OWL_EDITWIN_STYLE_ONELINE, owl_global_get_cmd_history(&g));
    19151912  tw=owl_global_get_typwin(&g);
    1916   owl_global_set_typwin_active(&g);
    1917   owl_editwin_new_style(tw, OWL_EDITWIN_STYLE_ONELINE,
    1918                         owl_global_get_cmd_history(&g));
    19191913
    19201914  owl_editwin_set_locktext(tw, "command: ");
     
    19311925  owl_editwin *tw;
    19321926
     1927  owl_global_set_typwin_active(&g, OWL_EDITWIN_STYLE_ONELINE, owl_global_get_cmd_history(&g));
    19331928  tw=owl_global_get_typwin(&g);
    1934   owl_global_set_typwin_active(&g);
    1935   owl_editwin_new_style(tw, OWL_EDITWIN_STYLE_ONELINE, owl_global_get_cmd_history(&g));
    19361929
    19371930  owl_editwin_set_locktext(tw, line);
     
    19471940  owl_editwin *tw;
    19481941
    1949   tw=owl_global_get_typwin(&g);
    1950   owl_global_set_typwin_active(&g);
    1951   owl_editwin_new_style(tw, OWL_EDITWIN_STYLE_ONELINE, owl_global_get_cmd_history(&g));
     1942  owl_global_set_typwin_active(&g, OWL_EDITWIN_STYLE_ONELINE, owl_global_get_cmd_history(&g));
     1943  tw = owl_global_get_typwin(&g);
    19521944  owl_editwin_set_echochar(tw, '*');
    19531945
Note: See TracChangeset for help on using the changeset viewer.