Hi,

I'm actually thinking this is a niche option.  I wouldn't think it's
needed.

Thomas Adam

On 21 Feb 2014 19:53, "Balazs Kezes" <rlblas...@gmail.com> wrote:
>
> When you increase the height of the pane and you have some history then
> the last lines of it will be pulled into the visible screen's content.
> This is quite annoying for me and would like to have the option of just
> filling the bottom with blanks. Do you also think this is a good idea?
>
> I'm thinking an implementation along the following lines (my comments
> continue below the patch):
>
> diff --git a/screen.c b/screen.c
> index 7bfc015..fc5b2cc 100644
> --- a/screen.c
> +++ b/screen.c
> @@ -227,15 +227,17 @@ screen_resize_y(struct screen *s, u_int sy)
>                  * Try to pull as much as possible out of the history, if
is
>                  * is enabled.
>                  */
> -               available = gd->hsize;
> -               if (gd->flags & GRID_HISTORY && available > 0) {
> -                       if (available > needed)
> -                               available = needed;
> -                       gd->hsize -= available;
> -                       s->cy += available;
> -               } else
> -                       available = 0;
> -               needed -= available;
> +               if (options_get_number(&w->options, "pull-from-history"))
{
> +                       available = gd->hsize;
> +                       if (gd->flags & GRID_HISTORY && available > 0) {
> +                               if (available > needed)
> +                                       available = needed;
> +                               gd->hsize -= available;
> +                               s->cy += available;
> +                       } else
> +                               available = 0;
> +                       needed -= available;
> +               }
>
>                 /* Then fill the rest in with blanks. */
>                 for (i = gd->hsize + sy - needed; i < gd->hsize + sy; i++)
>
> My problem is at "options_get_number(&window->options,
> "pull-from-history")". We don't have a reference to a window here so
> this cannot be done.
>
> So here are my options:
> 1) Pass down the window structure.
> 2) Pass down this flag in a new parameter (similarly to the reflow
>    parameter in screen_resize).
> 3) Make it a global server option.
> 4) Dump the old behavior and just delete all this extra logic.
>
> I'm leaning to option 3) or 4) because those are the simplest to
> implement but I'm open to suggestions.
>
> Thanks!
>
> --
> Balazs
>
>
------------------------------------------------------------------------------
> Managing the Performance of Cloud-Based Applications
> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> Read the Whitepaper.
>
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
> _______________________________________________
> tmux-users mailing list
> tmux-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tmux-users
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to