summaryrefslogtreecommitdiff
path: root/src/screen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/screen.c')
-rw-r--r--src/screen.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/screen.c b/src/screen.c
index afd9b4a..d0f573c 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -324,9 +324,9 @@ void term_screen_erase_line(struct term *t, int mode)
void term_screen_delete_chars(struct term *t, int n)
{
+ t->pending_wrap = false;
if (t->cursor_x >= t->cols)
return;
- t->pending_wrap = false;
int x = t->cursor_x;
int cols = t->cols;
if (n > cols - x)
@@ -365,9 +365,9 @@ void term_screen_delete_chars(struct term *t, int n)
void term_screen_insert_chars(struct term *t, int n)
{
+ t->pending_wrap = false;
if (t->cursor_x >= t->cols)
return;
- t->pending_wrap = false;
int x = t->cursor_x;
int cols = t->cols;
if (n > cols - x)
@@ -407,6 +407,7 @@ void term_screen_insert_chars(struct term *t, int n)
void term_screen_erase_all(struct term *t)
{
+ t->pending_wrap = false;
struct screen *s = &t->scr;
bool pristine = using_default_colors(t);
for (int y = 0; y < s->rows; y++) {
@@ -544,6 +545,7 @@ static inline bool srow_has_text(const struct srow *r, int cols)
void term_screen_erase(struct term *t, int mode)
{
+ t->pending_wrap = false;
if (mode == 3) {
term_hist_clear(&t->hist);
term_hist_view_clear(&t->view);
@@ -667,6 +669,7 @@ static void rotate_and_clear_srows(struct term *t, struct srow *base, int height
void term_screen_scroll_region(struct term *t, int top, int bottom, int count,
bool down, bool history)
{
+ t->pending_wrap = false;
if (count <= 0 || top > bottom || top < 0 || bottom >= t->rows)
return;
int height = bottom - top + 1;