mirror of
https://github.com/irssi/irssi.git
synced 2026-08-08 19:30:15 +02:00
Fix nick character counting: Add missing underscore and pipe chars
- Add missing '_' (underscore) and '|' (pipe) to count_nick_chars()
- Now matches isnickchar definition from fe-messages.c
- Fixes issue where nicks like 'big_Fat_boy' weren't truncated properly
- Nick counting now includes: alphanumeric + `-_[]{}|\^
Test case: 'big_Fat_boy' (11 chars) should now be truncated to 'big_Fat_b>>'
with width=10
Timestamp: 2025-01-25 00:08
This commit is contained in:
parent
f69e40e745
commit
cf9af2298e
2 changed files with 5 additions and 4 deletions
|
|
@ -319,7 +319,7 @@ settings = {
|
|||
theme = "default.theme";
|
||||
nick_column_enabled = "yes";
|
||||
nick_column_width = "10";
|
||||
debug_nick_column = "yes";
|
||||
debug_nick_column = "no";
|
||||
};
|
||||
"fe-text" = {
|
||||
lag_min_show = "1s";
|
||||
|
|
|
|||
|
|
@ -58,9 +58,10 @@ static int count_nick_chars(const char *str)
|
|||
if (isalnum(*p)) {
|
||||
count++;
|
||||
}
|
||||
/* Specjalne znaki nicka */
|
||||
else if (*p == '-' || *p == '[' || *p == ']' || *p == '\\' ||
|
||||
*p == '`' || *p == '^' || *p == '{' || *p == '}') {
|
||||
/* Specjalne znaki nicka - zgodnie z isnickchar z fe-messages.c */
|
||||
else if (*p == '`' || *p == '-' || *p == '_' ||
|
||||
*p == '[' || *p == ']' || *p == '{' || *p == '}' ||
|
||||
*p == '|' || *p == '\\' || *p == '^') {
|
||||
count++;
|
||||
}
|
||||
/* Ignoruje kody kolorów %B %N %Y %n itp. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue