Resizing works and scroll bars in position - though they do not work.
Move logic of handling the scrolling of content to a single method.
Fixed code to save scrolling up lines in the buffer, till we have the
space in buffer.