Skip to content

Commit 757b0f1

Browse files
committed
Dump received character width overlay for debugging.
1 parent a30e3eb commit 757b0f1

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/terminal/parseraction.cc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,12 @@
3030
also delete it here.
3131
*/
3232

33+
#include <unistd.h>
3334
#include <wctype.h>
3435

36+
#include <fstream>
37+
#include <sstream>
38+
3539
#include "parseraction.h"
3640
#include "terminal.h"
3741

@@ -101,6 +105,13 @@ void Resize::act_on_terminal( Terminal::Emulator *emu ) const
101105
void ChWidthOverlay::act_on_terminal( Terminal::Emulator *emu ) const
102106
{
103107
emu->chwidth_overlay( overlay );
108+
// XXX debug/exposition-- drop a copy of the overlay.
109+
{
110+
std::ostringstream s;
111+
s << "/tmp/chwidth_overlay_" << getpid();
112+
std::ofstream f(s.str().c_str());
113+
f << overlay;
114+
}
104115
}
105116

106117
void HoldSession::act_on_terminal( Terminal::Emulator *emu ) const

0 commit comments

Comments
 (0)