poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] cmd: set: Introduce array-cutoff parameter


From: Jose E. Marchesi
Subject: Re: [PATCH] cmd: set: Introduce array-cutoff parameter
Date: Thu, 13 Feb 2020 12:59:55 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hi Carlo.

    +@item array-cutoff
    +@cindex array cutoff
    +When displaying an array as struct field, display only the elements up to 
the
    +@code{cutoff} index and display @code{...} after that. Value of @code{0}
    +means no limit. This cutoff value is not used when directly displaying 
arrays
    +content.

What about making the option more similar to the other o* options?
Something like oacutoff...

     pvm_val
     pvm_make_int (int32_t value, int size)
     {
    @@ -794,6 +796,15 @@ pvm_print_val (pvm_val val, int base, int flags)
     
               if (idx != 0)
                 pk_puts (",");
    +
    +          if ((pvm_array_cutoff (poke_vm) != 0) &&
    +             ((pvm_array_cutoff (poke_vm) <= idx) &&
    +              (pk_odepth != 0)))
    +            {
    +              pk_puts("...");
    +              break;
    +            }
    +

I would use a styling class for the ellipsis... people may want to
customize it so it is more visible.  Maybe a "ellipsis" class?

Other than that, this is definitely a good option :)
Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]