1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -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: case LINK_FIELD:
fc = get_link_form_control(link); fc = get_link_form_control(link);
fs = find_form_state(doc_view, fc); fs = find_form_state(doc_view, fc);
if (!fs)
return 0;
#ifdef CONFIG_UTF_8 #ifdef CONFIG_UTF_8
if (utf8) { else if (utf8) {
return fs ? fs->state_cell - fs->vpos : 0; return fs->state_cell - fs->vpos;
} else }
#endif /* CONFIG_UTF_8 */ #endif /* CONFIG_UTF_8 */
return fs ? fs->state - fs->vpos : 0; else
return fs->state - fs->vpos;
case LINK_AREA: case LINK_AREA:
fc = get_link_form_control(link); fc = get_link_form_control(link);