1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

UTF-8: Reformat get_link_cursor_offset() a little.

This commit is contained in:
Kalle Olavi Niemitalo 2006-09-02 19:41:06 +03:00 committed by Kalle Olavi Niemitalo
parent e2685ae7b2
commit 92845d0b56

View File

@ -128,12 +128,15 @@ get_link_cursor_offset(struct document_view *doc_view, struct link *link)
case LINK_FIELD:
fc = get_link_form_control(link);
fs = find_form_state(doc_view, fc);
if (!fs)
return 0;
#ifdef CONFIG_UTF_8
if (utf8) {
return fs ? fs->state_cell - fs->vpos : 0;
} else
else if (utf8) {
return fs->state_cell - fs->vpos;
}
#endif /* CONFIG_UTF_8 */
return fs ? fs->state - fs->vpos : 0;
else
return fs->state - fs->vpos;
case LINK_AREA:
fc = get_link_form_control(link);