diff options
Diffstat (limited to 'contrib/replxx/src/util.hxx')
-rw-r--r-- | contrib/replxx/src/util.hxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/replxx/src/util.hxx b/contrib/replxx/src/util.hxx index 8afa0fa96..17c108680 100644 --- a/contrib/replxx/src/util.hxx +++ b/contrib/replxx/src/util.hxx @@ -10,10 +10,14 @@ inline bool is_control_code(char32_t testChar) { (testChar >= 0x7F && testChar <= 0x9F); // DEL and C1 controls } -void recompute_character_widths( char32_t const* text, char* widths, int charCount ); +inline char32_t control_to_human( char32_t key ) { + return ( key < 27 ? ( key + 0x40 ) : ( key + 0x18 ) ); +} + void calculate_screen_position( int x, int y, int screenColumns, int charCount, int& xOut, int& yOut ); int calculate_displayed_length( char32_t const* buf32, int size ); char const* ansi_color( Replxx::Color ); +std::string now_ms_str( void ); } |