* Grigorios Bouzakis <[email protected]> [090428 21:58]:
> So how do i get the pre 1.4.4 history behaviour back?
> How do can i get ratpoison to not keep any history at all?
> Setting historysize 0 doesnt work.
While there is a little shortcoming in the handling of 0 there,
:set historysize 0
should just reduce it to having only one item in the history.
(which at ratpoison exit time will usually be :quit...)
Shawn, may I push the attached patch, which changes historysize 0
to reduce the history to zero instead of one and stops writing the
history file in that case?
Hochachtungsvoll,
Bernhard R. Link
>From d5e70ba5716dd5b807f7550f9924711365116a8b Mon Sep 17 00:00:00 2001
From: Bernhard R. Link <[email protected]>
Date: Wed, 29 Apr 2009 11:35:52 +0200
Subject: [PATCH] Fix issues when historysize is zero.
If historysize is 0, do not create .ratpoison_history at exit
and do keep no entries in history. (Previously ratpoison would
always at least store the last entry).
---
src/history.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/history.c b/src/history.c
index b0e66fd..bea9fb6 100644
--- a/src/history.c
+++ b/src/history.c
@@ -151,6 +151,9 @@ history_add_upto (int history_id, const char *item, size_t max)
h->count--;
}
+ if( max == 0 )
+ return;
+
item_len = strlen(item);
i = xmalloc (sizeof(struct history_item) + item_len + 1);
@@ -217,6 +220,9 @@ history_save (void)
FILE *f;
struct history_item *item;
+ if (!defaults.history_size)
+ return;
+
if (!filename)
return;
f = fopen (filename, "w");
--
1.5.6.5
_______________________________________________
Ratpoison-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/ratpoison-devel