mirror of
https://github.com/irssi/irssi.git
synced 2026-08-09 11:50:10 +02:00
implement break_wide
for more pleasant east asian mixed display
This commit is contained in:
parent
7fd3c1f50a
commit
876c1dd93e
3 changed files with 21 additions and 4 deletions
|
|
@ -307,7 +307,7 @@ view_update_line_cache(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (!view->utf8 && char_width > 1) {
|
||||
if (view->break_wide && char_width > 1) {
|
||||
last_space = xpos;
|
||||
last_space_ptr = next_ptr;
|
||||
last_color = color; last_fg24 = fg24; last_bg24 = bg24;
|
||||
|
|
@ -665,6 +665,16 @@ void textbuffer_view_set_default_indent(TEXT_BUFFER_VIEW_REC *view,
|
|||
view->default_indent_func = indent_func;
|
||||
}
|
||||
|
||||
/* Enable breaking of wide chars */
|
||||
void textbuffer_view_set_break_wide(TEXT_BUFFER_VIEW_REC *view,
|
||||
gboolean break_wide)
|
||||
{
|
||||
if (view->break_wide != break_wide) {
|
||||
view->break_wide = break_wide;
|
||||
view_reset_cache(view);
|
||||
}
|
||||
}
|
||||
|
||||
static void view_unregister_indent_func(TEXT_BUFFER_VIEW_REC *view,
|
||||
INDENT_FUNC indent_func)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue