[bug #40204] Falsely truncated nicks due to weechat.look.nick_{prefix, suffix}

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[bug #40204] Falsely truncated nicks due to weechat.look.nick_{prefix, suffix}

Eric L.-2
URL:
  <http://savannah.nongnu.org/bugs/?40204>

                 Summary: Falsely truncated nicks due to
weechat.look.nick_{prefix,suffix}
                 Project: WeeChat
            Submitted by: None
            Submitted on: Tue 08 Oct 2013 09:36:34 AM UTC
                Category: display
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name:
        Originator Email: [hidden email]
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 0.4.2
                IRC nick: zralb

    _______________________________________________________

Details:

Though weechat.look.prefix_align_max being set to 0, nicks get truncated when
weechat.look.nick_prefix or weechat.look.nick_suffix is set to something non
empty.

How to reproduce:
/set weechat.look.nick_prefix "<"
and trigger a "redraw", for example by en-/disabling filters (Alt-=).
You should see nicks being truncated though all alignment related options
wouldn't trigger this. I don't know another way to trigger the redrawing.

Setting weechat.look.nick_prefix to "" (which is the preset) instantly
"untruncates" the nicks.




    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?40204>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/


_______________________________________________
Weechat-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/weechat-dev
Reply | Threaded
Open this post in threaded view
|

[bug #40204] Falsely truncated nicks due to weechat.look.nick_{prefix, suffix}

Eric L.-2
Follow-up Comment #1, bug #40204 (project weechat):

Attached is a diff that should fix the root if the problem, if I understood
all the prefix calculation code correctly.

I believe that 'prefix_length' already contains 'length_nick_prefix_suffix',
so there's no need to subtract it again. Subtracting it leads to nickname
truncation, as num_spaces will always be < 0.

(file #29372)
    _______________________________________________________

Additional Item Attachment:

File name: 0001-Correct-alignment-with-look.nick_-prefix-suffix.patch Size:0
KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?40204>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/


_______________________________________________
Weechat-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/weechat-dev
Reply | Threaded
Open this post in threaded view
|

[bug #40204] Falsely truncated nicks due to weechat.look.nick_{prefix, suffix}

Eric L.-2
Update of bug #40204 (project weechat):

              Item Group:                    None => display                
                  Status:                    None => Fixed                  
             Assigned to:                    None => flashcode              

    _______________________________________________________

Follow-up Comment #2:

The problem was not on display, but when filters are toggled.
The patch added some display bugs, prefix was shifted by some chars on the
right.
So the fix is to compute again the "prefix_max_length" in buffer when filters
are toggled.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?40204>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/


_______________________________________________
Weechat-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/weechat-dev