diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2019-08-07 14:31:17 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2019-08-07 14:31:17 +0300 |
commit | 1fcc5adc60097d1245ade154986bb67bf9cdb926 (patch) | |
tree | e77a9e5a961a9f9687a5efdd6b470ff9d25b807c /source/blender/editors/space_info/textview.c | |
parent | fa7643bc7bf815a61a57a03f6e42371269d4208b (diff) | |
parent | 5350015d519ec299b9a8937e4e035fe405001d8d (diff) |
Merge branch 'soc-2019-openxr' into temp-vr-draw-threadtemp-vr-draw-thread
Diffstat (limited to 'source/blender/editors/space_info/textview.c')
-rw-r--r-- | source/blender/editors/space_info/textview.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/editors/space_info/textview.c b/source/blender/editors/space_info/textview.c index 108803a865f..24d3008b1e7 100644 --- a/source/blender/editors/space_info/textview.c +++ b/source/blender/editors/space_info/textview.c @@ -35,8 +35,6 @@ #include "GPU_immediate.h" #include "GPU_state.h" -#include "BKE_text.h" - #include "textview.h" static void console_font_begin(const int font_id, const int lheight) @@ -78,8 +76,8 @@ static void console_draw_sel(const char *str, const unsigned char bg_sel[4]) { if (sel[0] <= str_len_draw && sel[1] >= 0) { - const int sta = txt_utf8_offset_to_column(str, max_ii(sel[0], 0)); - const int end = txt_utf8_offset_to_column(str, min_ii(sel[1], str_len_draw)); + const int sta = BLI_str_utf8_offset_to_column(str, max_ii(sel[0], 0)); + const int end = BLI_str_utf8_offset_to_column(str, min_ii(sel[1], str_len_draw)); GPU_blend(true); GPU_blend_set_func_separate( @@ -156,7 +154,8 @@ static int console_draw_string(ConsoleDrawContext *cdc, } /* last part */ - ofs += txt_utf8_column_to_offset(str + ofs, (int)floor((float)cdc->mval[0] / cdc->cwidth)); + ofs += BLI_str_utf8_offset_from_column(str + ofs, + (int)floor((float)cdc->mval[0] / cdc->cwidth)); CLAMP(ofs, 0, str_len); *cdc->pos_pick += str_len - ofs; |