Hi! The heavy restructuring of the code left a bug in the command history saving. Following patch fixes that.
Daniel
From 597613f408bed7be0e242aa66821fe36e2b0a8b7 Mon Sep 17 00:00:00 2001 From: Daniel Carl <[email protected]> Date: Fri, 22 Feb 2013 20:57:48 +0100 Subject: [PATCH] Fixed none working command history saving. --- utilities.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/utilities.c b/utilities.c index f5aff5f..6ed42f8 100644 --- a/utilities.c +++ b/utilities.c @@ -23,7 +23,7 @@ void add_modkeys(char key); void save_command_history(char *line) { - GList *ch = client.state.commandhistory; + State *s = &client.state; char *c = line; while (isspace(*c) && *c) @@ -31,11 +31,11 @@ void save_command_history(char *line) if (!strlen(c)) return; - if (COMMANDHISTSIZE <= g_list_length(ch)) { + if (COMMANDHISTSIZE <= g_list_length(s->commandhistory)) { /* if list is too long - remove items from beginning */ - ch = g_list_delete_link(ch, g_list_first(ch)); + s->commandhistory = g_list_delete_link(s->commandhistory, g_list_first(s->commandhistory)); } - ch = g_list_append(ch, g_strdup(c)); + s->commandhistory = g_list_append(s->commandhistory, g_strdup(c)); } gboolean -- 1.7.9.5
signature.asc
Description: Digital signature
------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________ Vimprobable-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/vimprobable-users
