forked from enlightenment/enventor
enventor - decease line number correctly.
This commit is contained in:
parent
baf3125f55
commit
2c228080d4
|
@ -136,12 +136,7 @@ edit_changed_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
|
|||
}
|
||||
else
|
||||
{
|
||||
int decrease = 0;
|
||||
if (!strcmp(info->change.del.content, "<br/>"))
|
||||
{
|
||||
decrease++;
|
||||
syntax_color = EINA_FALSE;
|
||||
}
|
||||
int decrease = parser_line_cnt_get(ed->pd, info->change.del.content);
|
||||
|
||||
if (config_auto_indent_get(ed->cd))
|
||||
{
|
||||
|
|
|
@ -519,6 +519,23 @@ parser_cur_name_get(parser_data *pd, Evas_Object *entry, void (*cb)(void *data,
|
|||
td);
|
||||
}
|
||||
|
||||
int
|
||||
parser_line_cnt_get(parser_data *pd EINA_UNUSED, const char *src)
|
||||
{
|
||||
if (!src) return 0;
|
||||
|
||||
int cnt = 0;
|
||||
int br_len = 5; //srtlen("<br/>");
|
||||
|
||||
while ((src = strstr(src, "<br/>")))
|
||||
{
|
||||
cnt++;
|
||||
src += br_len;
|
||||
}
|
||||
|
||||
return cnt;
|
||||
}
|
||||
|
||||
Eina_Stringshare
|
||||
*parser_first_group_name_get(parser_data *pd EINA_UNUSED, Evas_Object *entry)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue