Skip to content

Commit

Permalink
Dump received character width overlay for debugging.
Browse files Browse the repository at this point in the history
  • Loading branch information
cgull committed Sep 1, 2018
1 parent a30e3eb commit 757b0f1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/terminal/parseraction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@
also delete it here.
*/

#include <unistd.h>
#include <wctype.h>

#include <fstream>
#include <sstream>

#include "parseraction.h"
#include "terminal.h"

Expand Down Expand Up @@ -101,6 +105,13 @@ void Resize::act_on_terminal( Terminal::Emulator *emu ) const
void ChWidthOverlay::act_on_terminal( Terminal::Emulator *emu ) const
{
emu->chwidth_overlay( overlay );
// XXX debug/exposition-- drop a copy of the overlay.
{
std::ostringstream s;
s << "/tmp/chwidth_overlay_" << getpid();
std::ofstream f(s.str().c_str());
f << overlay;
}
}

void HoldSession::act_on_terminal( Terminal::Emulator *emu ) const
Expand Down

0 comments on commit 757b0f1

Please sign in to comment.