Commits

Anonymous committed 9e45c04

Fixed wrong history entries.

If a command writes output to the message window, this was saved from second
char in the history instead of the called command. No we save the command
before calling the associated function.

committer: Hannes Schueller <hannes@yllr.net>

  • Participants
  • Parent commits 51c4561

Comments (0)

Files changed (1)

         len = strlen(commands[i].cmd);
         if (length >= len && !strncmp(c, commands[i].cmd, len) && (c[len] == ' ' || !c[len])) {
             found = TRUE;
+            save_command_history(c);
             a.i = commands[i].arg.i;
             a.s = g_strdup(length > len + 1 ? &c[len + 1] : commands[i].arg.s);
             success = commands[i].func(&a);
             break;
         }
     }
-    save_command_history(c);
     if (!found) {
         a.i = Error;
         a.s = g_strdup_printf("Not a browser command: %s", c);