Changeset 8df36cc for commands.c


Ignore:
Timestamp:
Jul 3, 2002, 6:56:07 PM (18 years ago)
Author:
Erik Nygren <nygren@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
10b866d
Parents:
217a43e
Message:
	Fixed a bug in the "reply -e" command (for real this time).
	Always clear the command buffer before executing the command.
	        (So that interactive commands can sanely do start-command.)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • commands.c

    r217a43e r8df36cc  
    11511151  int edit=0;
    11521152 
    1153   if (argc==2 && !strcmp("-e", argv[1])) {
     1153  if (argc>=2 && !strcmp("-e", argv[1])) {
    11541154    edit=1;
    11551155    argv++;
     
    15321532void owl_command_editline_done(owl_editwin *e) {
    15331533  owl_history *hist=owl_global_get_history(&g);
    1534   char *rv;
     1534  char *rv, *cmd;
    15351535
    15361536  owl_global_set_typwin_inactive(&g);
    15371537  owl_history_store(hist, owl_editwin_get_text(e));
    15381538  owl_history_reset(hist);
    1539   rv = owl_function_command(owl_editwin_get_text(e));
    1540  
    1541   /* if we're still in ONELINE mode we can clear the buffer */
    1542   if (owl_editwin_get_style(e)==OWL_EDITWIN_STYLE_ONELINE) {
    1543     owl_editwin_fullclear(e);
    1544   }
    1545  
     1539  cmd = owl_strdup(owl_editwin_get_text(e));
     1540  owl_editwin_fullclear(e);
     1541  rv = owl_function_command(cmd);
     1542  owl_free(cmd);
     1543
    15461544  wnoutrefresh(owl_editwin_get_curswin(e));
    15471545  owl_global_set_needrefresh(&g);
Note: See TracChangeset for help on using the changeset viewer.