WISH: just for fun, do shade and tint with XRender.
6.1
-TODO: trailing spaces rmeoval for rect selections
- update iso8859-7 table (euro and drachma round-trip et al.).
- fix a crash when the selection scrolls out of the scrollback
while the user still drags.
to extremely long lines and (hopefully) some segfaults.
- iso14755 overlay position was wrong.
- iso14755 overlay now displays rendition info, too.
+ - use unicode white space instead of hardcoded values for stripping
+ whitespace.
+ - do whitespace stripping on rectangular selections.
6.0 Sat Dec 24 13:58:56 CET 2005
- make it compile without SMART_RESIZE again.
if (selection.rect)
{
for (row = max (selection.beg.row, -view_start); row <= min (selection.end.row, view_end); row++)
- for (rend_t *srp = ROW(row).r, col = selection.beg.col; col < selection.end.col; col++)
- srp[col] ^= RS_RVid;
+ {
+ text_t *stp = ROW(row).t;
+ rend_t *srp = ROW(row).r;
+
+ for (col = selection.beg.col; col < selection.end.col; col++)
+ srp[col] ^= RS_RVid;
+
+ while (col-- > selection.beg.col && (stp[col] == NOCHAR || unicode::is_space (stp[col])))
+ srp[col] ^= RS_RVid | RS_Uline;
+ }
}
else
#endif
col = max (col, 0);
if (row == selection.end.row || selection.rect)
- end_col = min (end_col, selection.end.col);
+ min_it (end_col, selection.end.col);
t = ROW(row).t + col;
for (; col < end_col; col++)
new_selection_text[ofs++] = *t++;
}
- if (!ROW(row).is_longer () && row != selection.end.row)
- new_selection_text[ofs++] = C0_LF;
+#if ENABLE_FRILLS
+ if (selection.rect)
+ {
+ while (ofs
+ && new_selection_text[ofs - 1] != C0_LF
+ && unicode::is_space (new_selection_text[ofs - 1]))
+ --ofs;
+
+ new_selection_text[ofs++] = C0_LF;
+ }
+ else
+#endif
+ if (!ROW(row).is_longer () && row != selection.end.row)
+ new_selection_text[ofs++] = C0_LF;
}
if (end_col != selection.end.col)
while (--end_col >= 0)
{
- if (stp[end_col] != ' '
- && stp[end_col] != '\t'
- && stp[end_col] != NOCHAR)
+ if (stp[end_col] != NOCHAR
+ && !unicode::is_space (stp[end_col]))
break;
}