EOL_* codes should only be set on the last screen_char_t in a line (at index WIDTH)--they indicate if a line ends because of a hard newline (EOL_HARD), because a long line was wrapped (EOL_SOFT), or if a double-width character was moved to the next line because there wasn't enough room for it (EOL_DWC). If we do end up moving double-width chars to the next line when they run into a vsplit, there should probably just be a space instead of a DWC_SKIP (what's done on the line below), but still set DWC_SKIP if there isn't a vsplit or rightMargin == WIDTH - 1.