mirror of
https://github.com/irssi/irssi.git
synced 2026-08-22 10:02:22 +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";
|
theme = "default.theme";
|
||||||
nick_column_enabled = "yes";
|
nick_column_enabled = "yes";
|
||||||
nick_column_width = "10";
|
nick_column_width = "10";
|
||||||
debug_nick_column = "yes";
|
debug_nick_column = "no";
|
||||||
};
|
};
|
||||||
"fe-text" = {
|
"fe-text" = {
|
||||||
lag_min_show = "1s";
|
lag_min_show = "1s";
|
||||||
|
|
|
||||||
|
|
@ -58,9 +58,10 @@ static int count_nick_chars(const char *str)
|
||||||
if (isalnum(*p)) {
|
if (isalnum(*p)) {
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
/* Specjalne znaki nicka */
|
/* Specjalne znaki nicka - zgodnie z isnickchar z fe-messages.c */
|
||||||
else if (*p == '-' || *p == '[' || *p == ']' || *p == '\\' ||
|
else if (*p == '`' || *p == '-' || *p == '_' ||
|
||||||
*p == '`' || *p == '^' || *p == '{' || *p == '}') {
|
*p == '[' || *p == ']' || *p == '{' || *p == '}' ||
|
||||||
|
*p == '|' || *p == '\\' || *p == '^') {
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
/* Ignoruje kody kolorów %B %N %Y %n itp. */
|
/* Ignoruje kody kolorów %B %N %Y %n itp. */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue