Skip to content

Commit

Permalink
Save/Restore "Show invisibles" setting. (#97)
Browse files Browse the repository at this point in the history
Fixes #47.
  • Loading branch information
OscarL authored Mar 16, 2024
1 parent 3e64f34 commit e372244
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Sources/PText.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,9 @@ void PText::ApplySettings(const BMessage& msg)
if (msg.FindInt32("tabstop", &i) == B_OK)
fTabStops = i;

if (msg.FindBool("show invisibles", &b) == B_OK)
fShowInvisibles = b;

if (gRestoreFont)
{
if (msg.FindBool("show tabs", &b) == B_OK)
Expand Down Expand Up @@ -542,6 +545,8 @@ void PText::CollectSettings(BMessage& msg)
FailOSErr(msg.AddInt32("tabstop", TabStops()));
FailOSErr(msg.AddBool("show tabs", Doc()->ToolBar()->ShowsTabs()));

FailOSErr(msg.AddBool("show invisibles", fShowInvisibles));

FailOSErr(msg.AddInt32("fontkind", fFontKind));
if (fFontKind == kIndividualFont) {
font_family ff;
Expand Down

0 comments on commit e372244

Please sign in to comment.