diff --git a/docs/notework.txt b/docs/notework.txt index 5514de9..0d121b4 100644 --- a/docs/notework.txt +++ b/docs/notework.txt @@ -12,6 +12,9 @@ ______________________________________________________________________ Notes for GoldED+ 1.1.4.5, May XX 2000 ______________________________________________________________________ +- EditExportText now saves whole the message to file, this is more + predictable behaviour than before. + - Fixed incorrect lines chain after insertion from file/clipboard. - Function that builds full pathname bit adjusted for non-UNIX diff --git a/golded3/gectrl.cpp b/golded3/gectrl.cpp index e076e96..604b531 100644 --- a/golded3/gectrl.cpp +++ b/golded3/gectrl.cpp @@ -163,9 +163,10 @@ char* mime_header_encode(char* dest, const char* source, GMsg* msg) { if(not inmime) { if(msg->charset) { bp = stpcpy(bp, "=?"); - if(strneql(msg->charset, "latin-", 6)) { + if(strneql(msg->charset, "latin", 5)) { static const char *isono[] = { "15", "1", "2", "3", "4", "9", "10", "13", "14", "15" }; - int chsno = atoi(msg->charset+6); + int chsno = atoi(msg->charset+5); + if(chsno < 0) chsno = -chsno; // support for both latin-1 and latin1 chsno = chsno > sizeof(isono)/sizeof(const char *) ? 0 : chsno; bp = strxmerge(bp, 12, "iso-8859-", isono[chsno]); } diff --git a/golded3/geedit2.cpp b/golded3/geedit2.cpp index 34f4aa0..a99c310 100644 --- a/golded3/geedit2.cpp +++ b/golded3/geedit2.cpp @@ -1227,8 +1227,8 @@ void IEclass::editexport(Line* __exportline, int __endat) { fputc('\n', _fp); while((__endat ? __exportline != currline : 1) and __exportline) { - fputs(__exportline->txt.c_str(), _fp); - if(__exportline->txt.find('\n') != __exportline->txt.npos) + fwrite(__exportline->txt.c_str(), 1, __exportline->txt.length(), _fp); + if(__exportline->txt.find('\n') == __exportline->txt.npos) fputc('\n', _fp); __exportline = __exportline->next; } @@ -1270,15 +1270,12 @@ void IEclass::ExportText() { GFTRK("EditExportText"); int endat = NO; - Line* exportline = Edit__pastebuf; + // Line* exportline = findanchor(); - if(not exportline) { - exportline = findanchor(); - if(exportline) - endat = YES; - else - exportline = findfirstline(); - } + // if(exportline) + // endat = YES; + // else + Line* exportline = findfirstline(); editexport(exportline, endat);