Changeset 0d17295


Ignore:
Timestamp:
Mar 23, 2010, 5:23:43 PM (10 years ago)
Author:
Nelson Elhage <nelhage@ksplice.com>
Branches:
master, release-1.6, release-1.7, release-1.8, release-1.9
Children:
d83621c4
Parents:
38cc669
git-author:
Nelson Elhage <nelhage@mit.edu> (03/14/10 00:02:34)
git-committer:
Nelson Elhage <nelhage@ksplice.com> (03/23/10 17:23:43)
Message:
Merge editresponse:done and edit:done into a single command.
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • commands.c

    r38cc669 r0d17295  
    911911                  "", ""),
    912912
    913   OWLCMD_VOID_CTX("editresponse:done", owl_command_editresponse_done,
    914                   OWL_CTX_EDITRESPONSE,
    915                   "completes the response to a question",
    916                   "", ""),
     913  OWLCMD_ALIAS   ("editresponse:done", "edit:done"),
    917914
    918915  OWLCMD_VOID_CTX("edit:move-up-line", owl_editwin_key_up,
     
    927924
    928925  OWLCMD_VOID_CTX("edit:done", owl_command_edit_done,
    929                   OWL_CTX_EDITMULTI,
    930                   "completes the command (eg, sends message being composed)",
     926                  OWL_CTX_EDIT,
     927                  "Finishes entering text in the editwin.",
    931928                  "", ""),
    932929
     
    27752772}
    27762773
    2777 
    2778 void owl_command_editresponse_done(owl_editwin *e)
    2779 {
    2780   owl_function_run_buffercommand();
    2781 
    2782   owl_global_set_typwin_inactive(&g);
    2783   owl_global_pop_context(&g);
    2784 
    2785   owl_global_set_needrefresh(&g);
    2786 }
    2787 
    2788 
    27892774void owl_command_edit_done(owl_editwin *e)
    27902775{
    27912776  owl_history *hist=owl_editwin_get_history(e);
    27922777
    2793   owl_history_store(hist, owl_editwin_get_text(e));
    2794   owl_history_reset(hist);
     2778  if (hist) {
     2779    owl_history_store(hist, owl_editwin_get_text(e));
     2780    owl_history_reset(hist);
     2781  }
    27952782
    27962783  owl_function_run_buffercommand();
  • functions.c

    r38cc669 r0d17295  
    19401940  owl_editwin *tw;
    19411941
    1942   owl_global_set_typwin_active(&g, OWL_EDITWIN_STYLE_ONELINE, owl_global_get_cmd_history(&g));
     1942  owl_global_set_typwin_active(&g, OWL_EDITWIN_STYLE_ONELINE, NULL);
    19431943  tw = owl_global_get_typwin(&g);
    19441944  owl_editwin_set_echochar(tw, '*');
Note: See TracChangeset for help on using the changeset viewer.