diff options
Diffstat (limited to 'src/fe-text/textbuffer-view.c')
-rw-r--r-- | src/fe-text/textbuffer-view.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/fe-text/textbuffer-view.c b/src/fe-text/textbuffer-view.c index e2e3707b..486b7234 100644 --- a/src/fe-text/textbuffer-view.c +++ b/src/fe-text/textbuffer-view.c @@ -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) { |