about summary refs log tree commit diff
path: root/complete.c
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2021-06-04 22:14:44 -0700
committerJune McEnroe <june@causal.agency>2021-06-05 13:23:23 -0400
commit8d7460859b9f4a74b4d8c19295de4f8d21117f2b (patch)
treeb43b2dcb6eeb86648e3277f03f6c09e628cc4113 /complete.c
parentList windows with /window (diff)
downloadcatgirl-8d7460859b9f4a74b4d8c19295de4f8d21117f2b.tar.gz
catgirl-8d7460859b9f4a74b4d8c19295de4f8d21117f2b.zip
Avoid writing past the end of the status bar
When waddnstr is called with a string that would extend past the
end of the window, the string is truncated, the cursor remains at
the last column, and ERR is returned. If this error is ignored and
the loop continues, the next call to waddnstr overwrites the character
at this column, resulting in a slight visual artifact. When the
window is too small to fit the full status line, it is effectively
truncated by one space on the right, since the string shown for
each channel begins with a space.  Additionally, if the last window
is the current window, the space is shown with a colored background.

To fix this, when waddnstr returns ERR, exit the loop in styleAdd()
early return -1 to propogate this error down to the caller.
Diffstat (limited to 'complete.c')
0 files changed, 0 insertions, 0 deletions
ormat->split at end of stringJune McEnroe 2018-09-13Avoid uninitialized x in uiReadJune McEnroe 2018-09-13Add IRCDefault to colors enumJune McEnroe 2018-09-13Return a format->split even at the end of the stringJune McEnroe 2018-09-13Fix weird tab-complete after commaJune McEnroe 2018-09-13Rewrite UI againJune McEnroe 2018-09-12Add note about C-oJune McEnroe 2018-09-12Use formatParse split to position input cursorJune McEnroe 2018-09-12Factor out IRC formatting parsingJune McEnroe 2018-09-11Add /help equivalent to /manJune McEnroe 2018-09-11Don't render every PM as a pingJune McEnroe 2018-09-11Add urlOpenMatchJune McEnroe 2018-09-10Depend on man.sh for chroot.tar targetJune McEnroe 2018-09-10Set LESSSECURE=1 in man.shJune McEnroe 2018-09-10Add /man commandJune McEnroe 2018-09-10Install man page in chrootJune McEnroe 2018-09-10Install man pageJune McEnroe 2018-09-10Split keys into subsections and document colorsJune McEnroe 2018-09-10Add "blank" lines to chatte.1June McEnroe 2018-09-10Document key bindings in chatte.1June McEnroe 2018-09-08Document slash commands in chatte.1June McEnroe