aboutsummaryrefslogtreecommitdiffhomepage
path: root/config.def.h
diff options
context:
space:
mode:
authorGravatar Mark Edgar <medgar123@gmail.com>2013-08-26 00:10:47 +0200
committerGravatar Roberto E. Vargas Caballero <k0ga@shike2.com>2013-09-04 18:33:02 +0200
commit4245ba0d12a330b3e54c6498e88024d90956ae34 (patch)
tree843d42fca2260a2e2426715a15c9928f85ce6f93 /config.def.h
parentf3d438b1015a031bc543bb2d65c81cc2329787d4 (diff)
Correctly initialize altscreen when defaultbg is not 0.
The alternate screen is not properly initialized when st starts. To see this, set defaultbg in config.h to anything other than 0 (for example, swap defaultfg and defaultbg), and run: ./st -e sh -c 'tput smcup; read' You should see that the top-left 80x24 rectangle is black (or whatever colorname[0] is), while the rest of the screen (if any) has the desired colorname[defaultbg] color. The attached patch fixes this by initializing term.c.attr in tnew() before calling tresize(). It also removes the unnecessary xcalloc() calls, which misled me on this bug hunt since it is really tclearregion() which initializes term.lines and term.alt in tresize().
Diffstat (limited to 'config.def.h')
-rw-r--r--config.def.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/config.def.h b/config.def.h
index 8cb8804..24aeb19 100644
--- a/config.def.h
+++ b/config.def.h
@@ -129,13 +129,13 @@ static Shortcut shortcuts[] = {
* * < 0: crlf mode is disabled
*
* Be careful with the order of the definitons because st searchs in
- * this table sequencially, so any XK_ANY_MOD must be in the last
+ * this table sequentially, so any XK_ANY_MOD must be in the last
* position for a key.
*/
/*
- * If you want something else but the function keys of X11 (0xFF00 - 0xFFFF)
- * mapped below, add them to this array.
+ * If you want keys other than the X11 function keys (0xFD00 - 0xFFFF)
+ * to be mapped below, add them to this array.
*/
static KeySym mappedkeys[] = { -1 };