parent
d21f1f9a65
commit
9b701fc3f8
|
@ -3637,7 +3637,7 @@ collections {
|
||||||
type: TEXTBLOCK;
|
type: TEXTBLOCK;
|
||||||
mouse_events: 1;
|
mouse_events: 1;
|
||||||
scale: 1;
|
scale: 1;
|
||||||
entry_mode: PASSOWRD;
|
entry_mode: PASSWORD;
|
||||||
multiline: 0;
|
multiline: 0;
|
||||||
source: "elm/entry/selection/default"; // selection under
|
source: "elm/entry/selection/default"; // selection under
|
||||||
source4: "elm/entry/cursor/default"; // cursorover
|
source4: "elm/entry/cursor/default"; // cursorover
|
||||||
|
|
|
@ -319,23 +319,20 @@ _text_to_mkup(const char *text)
|
||||||
{
|
{
|
||||||
char *str = NULL;
|
char *str = NULL;
|
||||||
int str_len = 0, str_alloc = 0;
|
int str_len = 0, str_alloc = 0;
|
||||||
int ch, pos = 0;
|
int ch, pos = 0, pos2 = 0;
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
// FIXME: use evas_string_char_next_get()
|
// FIXME: use evas_string_char_next_get()
|
||||||
ch = evas_common_font_utf8_get_next((unsigned char *)(text), &pos);
|
pos = pos2;
|
||||||
|
ch = evas_common_font_utf8_get_next((unsigned char *)(text), &pos2);
|
||||||
if (ch <= 0) break;
|
if (ch <= 0) break;
|
||||||
if (ch == '\n') str = _str_append(str, "<br>", &str_len, &str_alloc);
|
if (ch == '\n') str = _str_append(str, "<br>", &str_len, &str_alloc);
|
||||||
else if (ch == '\t') str = _str_append(str, "<\t>", &str_len, &str_alloc);
|
else if (ch == '\t') str = _str_append(str, "<\t>", &str_len, &str_alloc);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int pos2;
|
|
||||||
char tstr[16];
|
char tstr[16];
|
||||||
|
|
||||||
pos2 = pos;
|
|
||||||
// FIXME: use evas_string_char_next_get()
|
|
||||||
ch = evas_common_font_utf8_get_next((unsigned char *)(text), &pos2);
|
|
||||||
strncpy(tstr, text + pos, pos2 - pos);
|
strncpy(tstr, text + pos, pos2 - pos);
|
||||||
tstr[pos2 - pos] = 0;
|
tstr[pos2 - pos] = 0;
|
||||||
str = _str_append(str, tstr, &str_len, &str_alloc);
|
str = _str_append(str, tstr, &str_len, &str_alloc);
|
||||||
|
|
Loading…
Reference in New Issue