From bdefdb301db843e87aee8c6c35808d295bb66ee5 Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Mon, 26 Oct 2026 23:25:13 +0800 Subject: feat(tui): integrate address input and navigation requests --- ricochet/src/tui/text.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ricochet/src/tui/text.cc') diff --git a/ricochet/src/tui/text.cc b/ricochet/src/tui/text.cc index 95b324b..ba24af2 100644 --- a/ricochet/src/tui/text.cc +++ b/ricochet/src/tui/text.cc @@ -113,6 +113,7 @@ TextAnalysis TextService::analyze( std::string_view utf8, bool line_breaks, bool .break_after = line_end == end }; utext_setNativeIndex( text.get(), begin ); const auto first = utext_next32( text.get() ); + result.whitespace_only = result.whitespace_only && u_isUWhiteSpace( first ); glyph.word = word_kind( first ); const auto source = utf8.substr( glyph.bytes.start, glyph.bytes.end - glyph.bytes.start ); if ( line_breaks && ( source == "\n" || source == "\r\n" ) ) { @@ -128,6 +129,7 @@ TextAnalysis TextService::analyze( std::string_view utf8, bool line_breaks, bool && !u_hasBinaryProperty( first, UCHAR_EMOJI_PRESENTATION ); while ( utext_getNativeIndex( text.get() ) < end ) { const auto codepoint = utext_next32( text.get() ); + result.whitespace_only = result.whitespace_only && u_isUWhiteSpace( codepoint ); glyph.display.push_back( static_cast( codepoint ) ); // ncurses accepts one spacing character followed by nonspacing marks. // Joiners, selectors and extra spacing characters use one visible fallback. -- cgit v1.2.3