forked from enlightenment/efl
Evas textblock: Fixed removing of format pairs in a rare case.
Until now, removing the <ps> when <b><ps></b> would have left the <b></b> intact instead of removing them. SVN revision: 61529
This commit is contained in:
parent
92c22656d8
commit
412b203b46
|
@ -6898,7 +6898,6 @@ evas_textblock_cursor_char_delete(Evas_Textblock_Cursor *cur)
|
||||||
{
|
{
|
||||||
Evas_Object_Textblock *o;
|
Evas_Object_Textblock *o;
|
||||||
Evas_Object_Textblock_Node_Text *n, *n2;
|
Evas_Object_Textblock_Node_Text *n, *n2;
|
||||||
int merge_nodes = 0;
|
|
||||||
const Eina_Unicode *text;
|
const Eina_Unicode *text;
|
||||||
int chr, ind, ppos;
|
int chr, ind, ppos;
|
||||||
|
|
||||||
|
@ -6915,6 +6914,7 @@ evas_textblock_cursor_char_delete(Evas_Textblock_Cursor *cur)
|
||||||
|
|
||||||
if (chr == 0) return;
|
if (chr == 0) return;
|
||||||
ppos = cur->pos;
|
ppos = cur->pos;
|
||||||
|
eina_ustrbuf_remove(n->unicode, cur->pos, ind);
|
||||||
/* Remove a format node if needed, and remove the char only if the
|
/* Remove a format node if needed, and remove the char only if the
|
||||||
* fmt node is not visible */
|
* fmt node is not visible */
|
||||||
{
|
{
|
||||||
|
@ -6929,7 +6929,9 @@ evas_textblock_cursor_char_delete(Evas_Textblock_Cursor *cur)
|
||||||
format = last_fmt->format;
|
format = last_fmt->format;
|
||||||
if (format && _IS_PARAGRAPH_SEPARATOR(o, format))
|
if (format && _IS_PARAGRAPH_SEPARATOR(o, format))
|
||||||
{
|
{
|
||||||
merge_nodes = 1;
|
/* If it was a paragraph separator, we should merge the
|
||||||
|
* current with the next, there must be a next. */
|
||||||
|
_evas_textblock_cursor_nodes_merge(cur);
|
||||||
}
|
}
|
||||||
/* If a singnular, mark as invisible, so we'll delete it. */
|
/* If a singnular, mark as invisible, so we'll delete it. */
|
||||||
if (!format || ((*format != '+') && (*format != '-')))
|
if (!format || ((*format != '+') && (*format != '-')))
|
||||||
|
@ -6945,13 +6947,6 @@ evas_textblock_cursor_char_delete(Evas_Textblock_Cursor *cur)
|
||||||
|
|
||||||
_evas_textblock_node_format_remove_matching(o, fmt);
|
_evas_textblock_node_format_remove_matching(o, fmt);
|
||||||
}
|
}
|
||||||
eina_ustrbuf_remove(n->unicode, cur->pos, ind);
|
|
||||||
/* If it was a paragraph separator, we should merge the current with the
|
|
||||||
* next, there must be a next. */
|
|
||||||
if (merge_nodes)
|
|
||||||
{
|
|
||||||
_evas_textblock_cursor_nodes_merge(cur);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cur->pos == eina_ustrbuf_length_get(n->unicode))
|
if (cur->pos == eina_ustrbuf_length_get(n->unicode))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue