summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandmarti1424 <scim.spreadsheet@gmail.com>2016-04-10 18:41:17 -0300
committerandmarti1424 <scim.spreadsheet@gmail.com>2016-04-10 18:41:17 -0300
commit30e2c8858985fe5a4cf542489ac6970b6ca876a9 (patch)
tree7913e72a4b5bad1172c06e232315a1f08423bf4c
parent89e6ac638359fd4a7d91b32a7cee1787827cf254 (diff)
Fix saving command line history
-rwxr-xr-xsrc.scim2/history.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src.scim2/history.c b/src.scim2/history.c
index 2664a4e..78dba58 100755
--- a/src.scim2/history.c
+++ b/src.scim2/history.c
@@ -96,7 +96,6 @@ void load_history(struct history * h) {
int save_history(struct history * h) {
if (h->mode != ':' ) return -1;
char infofile [PATHLEN];
- char line [PATHLEN];
char * home;
FILE * f;
int i;
@@ -115,8 +114,7 @@ int save_history(struct history * h) {
// Traverse list back to front, so the history is saved in chronological order
for (i=0; i < h->len; i++) {
fwprintf(f, L":");
- wcstombs(line, nl->line, BUFFERSIZE);
- fwprintf(f, L"%ls\n", line);
+ fwprintf(f, L"%ls\n", nl->line);
nl = nl->pant;
}
fclose(f);