about summary refs log tree commit diff
path: root/scripts/chroot-man.sh
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 /scripts/chroot-man.sh
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 'scripts/chroot-man.sh')
0 files changed, 0 insertions, 0 deletions
>June McEnroe 2018-08-07Highlight and beep pingsJune McEnroe 2018-08-07Factor out allocating conversion between wcs and mbsJune McEnroe 2018-08-07Match commands case-insensitivelyJune McEnroe 2018-08-07Convert input to multibyte before handlingJune McEnroe 2018-08-07Populate tab-complete listJune McEnroe 2018-08-07Fix /me formatting side-effectsJune McEnroe 2018-08-07Define ui.c BUF_LEN with enumJune McEnroe 2018-08-07Hack clang into checking uiFmt format stringsJune McEnroe 2018-08-07Handle PART and QUIT without messagesJune McEnroe 2018-08-07Make safe filling the who bufferJune McEnroe 2018-08-07Add reverse and reset IRC formatting codesJune McEnroe 2018-08-06Rewrite line editing again, add formattingJune McEnroe 2018-08-06Fix allocation size in vaswprintfJune McEnroe 2018-08-06Implement word wrappingJune McEnroe 2018-08-06Use wchar_t strings for all of UIJune McEnroe 2018-08-06Rename line editing functionsJune McEnroe 2018-08-05Initialize all possible color pairsJune McEnroe 2018-08-05Refactor color initializationJune McEnroe 2018-08-05Add ^L redrawJune McEnroe 2018-08-05Use 16 colors if availableJune McEnroe 2018-08-05Limit parsed colors to number of mIRC colorsJune McEnroe 2018-08-04Show source link on exitJune McEnroe 2018-08-04Implement line editing, scrollingJune McEnroe 2018-08-04Handle /topicJune McEnroe