From 7161125e1df06b71c2f1910d2c4930c413e5c622 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Mon, 7 Jun 2004 05:29:42 +0000 Subject: save correctly prompts ending in whitespace. do not save command line options when -r is passed to mixvm. --- mixutils/mixvm_loop.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mixutils/mixvm_loop.c b/mixutils/mixvm_loop.c index dd37bc6..492ebc6 100644 --- a/mixutils/mixvm_loop.c +++ b/mixutils/mixvm_loop.c @@ -1,7 +1,7 @@ /* -*-c-*- -------------- mixvm_loop.c : * Implementation of mix vm command loop. * ------------------------------------------------------------------ - * $Id: mixvm_loop.c,v 1.11 2004/06/07 05:05:27 jao Exp $ + * $Id: mixvm_loop.c,v 1.12 2004/06/07 05:29:42 jao Exp $ * ------------------------------------------------------------------ * Copyright (C) 2000, 2001, 2002, 2004 Free Software Foundation, Inc. * @@ -117,10 +117,9 @@ mix_vmloop_set_prompt (const gchar *prompt) if (prompt) { if (PROMPT) g_free (PROMPT); - if (prompt[0] == '"') prompt++; - PROMPT = g_strdup (prompt); + PROMPT = g_strdup ((prompt[0] == '"') ? prompt + 1 : prompt); if (PROMPT[strlen (PROMPT) - 1] == '"') PROMPT[strlen (PROMPT) - 1] = 0; - mix_config_update (config_, PROMPT_KEY_, PROMPT); + mix_config_update (config_, PROMPT_KEY_, prompt); } } -- cgit v1.2.3