mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-15 05:33:58 -04:00
term: rows printed to now defaults to having a hard linebreak
That is, instead of requiring a ‘\n’ to be printed, non-empty lines are now treated as having a hard linebreak by default. The linebreak is cleared on an explicit wrap.
This commit is contained in:
parent
d101325885
commit
07652d3b9e
2 changed files with 8 additions and 2 deletions
|
|
@ -31,6 +31,11 @@
|
||||||
## Unreleased
|
## Unreleased
|
||||||
### Added
|
### Added
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
* Non-empty lines are now considered to have a hard linebreak,
|
||||||
|
_unless_ an actual word-wrap is inserted.
|
||||||
|
|
||||||
|
|
||||||
### Deprecated
|
### Deprecated
|
||||||
### Removed
|
### Removed
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
|
||||||
|
|
@ -2756,6 +2756,7 @@ print_linewrap(struct terminal *term)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
term->grid->cur_row->linebreak = false;
|
||||||
term->grid->cursor.lcf = false;
|
term->grid->cursor.lcf = false;
|
||||||
|
|
||||||
const int row = term->grid->cursor.point.row;
|
const int row = term->grid->cursor.point.row;
|
||||||
|
|
@ -2848,7 +2849,7 @@ term_print(struct terminal *term, wchar_t wc, int width)
|
||||||
cell->attrs = term->vt.attrs;
|
cell->attrs = term->vt.attrs;
|
||||||
|
|
||||||
row->dirty = true;
|
row->dirty = true;
|
||||||
row->linebreak = false;
|
row->linebreak = true;
|
||||||
|
|
||||||
/* Advance cursor the 'additional' columns while dirty:ing the cells */
|
/* Advance cursor the 'additional' columns while dirty:ing the cells */
|
||||||
for (int i = 1; i < width && term->grid->cursor.point.col < term->cols - 1; i++) {
|
for (int i = 1; i < width && term->grid->cursor.point.col < term->cols - 1; i++) {
|
||||||
|
|
@ -2887,7 +2888,7 @@ ascii_printer_fast(struct terminal *term, wchar_t wc)
|
||||||
cell->attrs = term->vt.attrs;
|
cell->attrs = term->vt.attrs;
|
||||||
|
|
||||||
row->dirty = true;
|
row->dirty = true;
|
||||||
row->linebreak = false;
|
row->linebreak = true;
|
||||||
|
|
||||||
/* Advance cursor */
|
/* Advance cursor */
|
||||||
if (unlikely(++term->grid->cursor.point.col >= term->cols)) {
|
if (unlikely(++term->grid->cursor.point.col >= term->cols)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue