mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-22 06:38:37 -05:00
settings.c: Don't ignore boolean settings
Revision 1b2f39c24bb6591a4192377d9393f5c3e45cb5bd introduced guards to use the built-in defaults in the event that the SESSKEY was null. This was later reverted in 39c20d4819794417e4e84429d1eb5430e3865b25 because (a) a null SESSKEY is precisely how the absence of a per-session configuration file is signalled to the backend, and (b) everything could apparently already cope with a null SESSKEY anyway. Unfortunately, in between these, 3214563d8ed7469e20d4ffdddd55c430334ce803 introduced new functions for handling boolean-valued settings. The reversion didn't affect the new `gppb_raw' function, which retained the erroneous guard against null SESSKEY. In consequence, PuTTY ignores X resources and `-xrm' settings unless `~/.putty/sessions/Default%20Settings' exists, causing undesirable behaviour such as starting login shells, establishing `utmp' entries, scrolling on output, failing to scroll on keypress, not blinking the cursor, etc. This isn't a total disaster: touching `~/.putty/sessions/Default%20Settings' makes the problem go away. But it seems worth fixing anyway. Apply the obvious one-line fix. Signed-off-by: Mark Wooding <mdw@distorted.org.uk>
This commit is contained in:
parent
a5bcf3d384
commit
400c895ced
@ -168,7 +168,7 @@ static void gppfile(settings_r *sesskey, const char *name,
|
|||||||
static bool gppb_raw(settings_r *sesskey, const char *name, bool def)
|
static bool gppb_raw(settings_r *sesskey, const char *name, bool def)
|
||||||
{
|
{
|
||||||
def = platform_default_b(name, def);
|
def = platform_default_b(name, def);
|
||||||
return sesskey ? read_setting_i(sesskey, name, def) != 0 : def;
|
return read_setting_i(sesskey, name, def) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gppb(settings_r *sesskey, const char *name, bool def,
|
static void gppb(settings_r *sesskey, const char *name, bool def,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user