diff --git a/uppsrc/Core/Stream.h b/uppsrc/Core/Stream.h index 7a6b7ea56..d35b93557 100644 --- a/uppsrc/Core/Stream.h +++ b/uppsrc/Core/Stream.h @@ -198,7 +198,7 @@ public: Stream& SerializeRaw(dword *data) { if(IsLoading()) *data = Get32le(); else Put32le(*data); return *this; } Stream& SerializeRaw(uint64 *data) { if(IsLoading()) *data = Get64le(); else Put64le(*data); return *this; } - Stream& operator%(bool& d) { return SerializeRaw((byte *)&d); } + Stream& operator%(bool& d) { byte b = d; SerializeRaw(&b); d = b; return *this; } Stream& operator%(char& d) { return SerializeRaw((byte *)&d); } Stream& operator%(signed char& d) { return SerializeRaw((byte *)&d); } Stream& operator%(unsigned char& d) { return SerializeRaw((byte *)&d); } diff --git a/uppsrc/ide/Insert.cpp b/uppsrc/ide/Insert.cpp index e69f33d2a..d6176dfdc 100644 --- a/uppsrc/ide/Insert.cpp +++ b/uppsrc/ide/Insert.cpp @@ -307,8 +307,15 @@ void Ide::InsertInclude(Bar& bar) void Ide::ToggleWordwrap() { + RLOG("==========="); + RDUMPHEX((int)*(byte *)&wordwrap); + RDUMP(wordwrap); wordwrap = !wordwrap; + RDUMPHEX((int)*(byte *)&wordwrap); + RDUMP(wordwrap); SetupEditor(); + RDUMP(wordwrap); + RLOG("........."); } void Ide::EditorMenu(Bar& bar) diff --git a/uppsrc/ide/ide.h b/uppsrc/ide/ide.h index e452877b5..86117d1e9 100644 --- a/uppsrc/ide/ide.h +++ b/uppsrc/ide/ide.h @@ -601,8 +601,8 @@ public: bool auto_rescan; bool auto_check; int spellcheck_comments; - bool wordwrap_comments; - bool wordwrap; + bool wordwrap_comments = true; + bool wordwrap = false; bool setmain_newide; bool gui_font_override = false; Font gui_font = StdFont();