Changeset 0d17295 for commands.c


Ignore:
Timestamp:
Mar 23, 2010, 5:23:43 PM (15 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:
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.
File:
1 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();
Note: See TracChangeset for help on using the changeset viewer.