After freeing D_xtable set the value to NULL so that checks of D_xtable
return false. RAW_PUTCHAR can cause a segfault if invoked after
FreeTransTable. This can happen in FreeDisplay when SetTTY encounters an
error performing an ioctl on the tty.
0 0x000055583e7032a4 in RAW_PUTCHAR (c=110) at display.c:656
1 0x000055583e6cbe4c in PutWinMsg (s=0x55583e932801 <winmsg_buf+1> "clark-dt -* ",
s@entry=0x55583e932800 <winmsg_buf> "nclark-dt -* ", start=<optimized out>, start@entry=0, max=40, max@entry=49) at screen.c:3053
2 0x000055583e7003f6 in PrePutWinMsg (s=0x55583e932800 <winmsg_buf> "nclark-dt -* ", start=0, max=49) at display.c:2174
3 0x000055583e705339 in RefreshLine (y=65, from=<optimized out>, to=48, isblank=0) at display.c:2399
4 0x000055583e70630c in MakeStatus (msg=0x7ffeaa03d7d0 "SetTTY (fd 3): ioctl failed: Input/output error") at display.c:2056
5 0x000055583e6c8a68 in Msg (err=<optimized out>, fmt=<optimized out>) at screen.c:2091
6 0x000055583e6c83a1 in CoreDump (sigsig=<optimized out>) at screen.c:1664
7 <signal handler called>
8 0x000055583e7032a4 in RAW_PUTCHAR (c=110) at display.c:656
9 0x000055583e6cbe4c in PutWinMsg (s=0x55583e932801 <winmsg_buf+1> "clark-dt -* ",
s@entry=0x55583e932800 <winmsg_buf> "nclark-dt -* ", start=<optimized out>, start@entry=0, max=40) at screen.c:3053
10 0x000055583e700443 in PrePutWinMsg (s=0x55583e932800 <winmsg_buf> "nclark-dt -* ", start=0, max=<optimized out>) at display.c:2165
11 0x000055583e705339 in RefreshLine (y=65, from=<optimized out>, to=48, isblank=0) at display.c:2399
12 0x000055583e70630c in MakeStatus (msg=0x7ffeaa040780 "SetTTY (fd 3): ioctl failed: Input/output error") at display.c:2056
13 0x000055583e6c8a68 in Msg (err=<optimized out>, fmt=<optimized out>, fmt@entry=0x55583e719f41 "SetTTY (fd %d): ioctl failed") at screen.c:2091
14 0x000055583e6dfadc in SetTTY (fd=<optimized out>, mp=<optimized out>) at tty.c:624
15 0x000055583e707d08 in FreeDisplay () at display.c:340
16 0x000055583e6c8612 in Detach (mode=mode@entry=2) at screen.c:2000
17 0x000055583e6dbb52 in FinishDetach (m=0x55583e933b80 <m>) at socket.c:1607
18 0x000055583e6ddcd5 in FinishAttach (m=m@entry=0x55583e933b80 <m>) at socket.c:1424
19 0x000055583e6de531 in ReceiveMsg () at socket.c:1235
20 0x000055583e711583 in sched () at sched.c:237
21 0x000055583e6c7113 in main (ac=0, av=<optimized out>) at screen.c:1466
Bug: 52133
Signed-off-by: Nate Clark <nate@neworld.us>
There's two way to terinate an OSC: ST (\033\\) or BEL (\a). Use
whatever the original request used instead of always forcing a BEL.
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
It allows for getting and setting the background color. Notably, Vim uses
OSC 11 to learn whether it's running on a light or dark colored terminal
and choose a color scheme accordingly.
Tested with gnome-terminal and xterm. When called with "?" argument the
current background color is returned:
$ echo -ne "\e]11;?\e\\"
$ 11;rgb:2323/2727/2929
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
It's almost unreadable on anything less
also we need to find space in the specified witdh, to make line breaks,
longest piece of text uninterrupted by space is 29 characters (link to
GPL license)
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
otherwise we end up with w_monitor still enabled after :monitor off
./screen
C-a :defmonitor on
C-a c
sleep 5 && echo -e "\a"
C-a c
C-a :monitor off
sleep 5 && echo -e "\a"
C-a 0
C-a :windowlist
it should render 1 and 2 window differently on windowlist
will need to be checked later, how it works with more than one user
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
not sure why it was done, but it seems to serve no functional purpose at
all and breaks displaying flags in :windowlist
display is used by AddWindowFlags to check whether we should show some
of flags and they are not shown when display == 0
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>