History

msg: allow to truncate the message to terminal width

Kacper Michajłow committed 2 years ago

Commit bf025cd1 parent 95f00469 files · +106 −15Browse files

Showing the changes to misc/codepoint_width.h (1 of 9 files). Show all

Unified · Split

misc/codepoint_width.h+4−1
@@ -6,6 +6,9 @@ · 5 unmodified lines
6 * @brief Determines the number of columns required to display a given string.6 * @brief Determines the number of columns required to display a given string.
7 *7 *
8 * @param str Sequence of UTF-8 chars8 * @param str Sequence of UTF-8 chars
9 * @param max_width Maximum allowed width of string
10 * @param cut_pos If max_width is exceeded, this will be initialized to last
11 * full printable character before width limit.
9 * @return int width of the string12 * @return int width of the string
10 */13 */
11int term_disp_width(bstr str);14int term_disp_width(bstr str, int max_width, const unsigned char **cut_pos);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t