Relocate is_combining_char() from gui-entry.c to src/core/utf8.c
as suggested in code review. This better organizes the codebase by
placing UTF-8 character classification logic with other UTF-8
utilities in the core module.
The function now uses is_utf8() instead of checking term_type
directly, which is the appropriate method for core layer code.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Addresses issue where emoji with variation selectors (like ❣️, ♥️) were
incorrectly calculated as width 1 instead of width 2, causing display
overflow in modern terminals.
- Add variation selector detection (0xFE0F) in string_advance_with_grapheme_support()
- Apply special width handling for base emoji + variation selector combinations
- Ensures consistent width calculation with input field processing
- Fixes chat window overflow issues in terminals like Ghostty
This brings string_advance logic in line with unichar_array_advance_cluster
which already had proper variation selector handling.
This commit addresses critical UTF-8 display and input issues, particularly
with emoji variations and complex Unicode sequences that caused rendering
problems in modern terminals like Ghostty.
Key improvements:
- Enhanced utf8.c with grapheme cluster detection using utf8proc
- Fixed input field handling to preserve emoji variation selectors
- Improved text measurement and cursor positioning for complex Unicode
- Added smart paste processing for multi-codepoint characters
- Bypassed problematic TRANSLIT when not needed for UTF-8 content
- Enhanced GUI entry and readline to handle grapheme clusters properly
The implementation maintains full backward compatibility while providing
proper support for modern Unicode standards, fixing display corruption
that occurred with emoji sequences containing variation selectors.
Tested with emoji sequences like: 💕💋😘🥰💞❣️💓♥️♥️💓❣️🥰🥰😘💋💋
This commit removes the `const` qualifier from certain member fields,
as the Darwin version of several `<term.h>` related functions only
accept a `char *` rather than a `const char *`, thereby resulting in
dozens of compiler warnings.
HOST_NOT_FOUND is a gethostbyname(3) error condition rather than a
getaddrinfo(3) error condition and cannot be passed to net_gethosterror
as documented as it calls gai_strerror(3). EAI_NONAME is the appropriate
similar error condition as standardized by POSIX for getaddrinfo(3).
inet_addr has become obsolescent as of POSIX-1.2024 and is not available
on strict POSIX 2024 libc implementations.
inet_pton(3) is the standard and portable replacement available on all
POSIX-1.2001 systems.
This is the header required by POSIX-1.2024.
This change is needed to build irssi on operating systems such as Sortix
that have a strict libc without obsolete behaviors.
when attempting SASL, if multiple CAP ACK were received (for example,
because a script sent an additional CAP REQ), then any not containing
`sasl` would cause SASL to fail (immediately aborting the connection
with no message, depending on sasl_disconnect_on_failure setting)
check not only if SASL is set in this line, but also if we've already
seen it in a previous line.