Screen 'jitter' when deleting lines

Post Reply
Nyyrazzilyss
Posts: 334
Joined: Thu Mar 05, 2015 2:53 am

Screen 'jitter' when deleting lines

Post by Nyyrazzilyss »

I've noticed something in my script I should probably fix. I have a 'condensed' mode I use that deletes/replaces many lines received from the mud.

In particular, I might delete the last couple lines received, and replace them with a single line. This has the effect though of moving the entire screen downwards, then back upwards a line. The screen doesn't scroll smoothly, I see occasional 'jitter' in it.

On a 30 line screen: Is there a way to clear (for example) the 29th and 30th line, and have the next line to arrive print on the 29th line (without the screen moving down/up)?

Buck
Posts: 19
Joined: Tue Aug 30, 2016 8:11 pm

Re: Screen 'jitter' when deleting lines

Post by Buck »

One way, which might not be the best, is to append a number of line feeds to your replacement that is equal to the number of lines you're reducing the output by. You'll have to prepend a linefeed match to your replacement regex to make this work.

Post Reply