Introduce html_subscript_close callback. Draw opening and closing brackets
and carets for subscript and superscript text directly in the element
handlers rather than performing weirdness in the renderer. This both
improves readability and fixes bug 284, misplaced brackets with subscripts.
Add close callbacks html_html_close, html_style_close, and
html_xmp_close. end_element now calls the element close callback instead
of performing special handling for certain tags.
src/bfu/menu.c (scroll_menu): Let neither menu->selected nor pos
become -2.
src/bfu/menu.c (menu_mouse_handler): Call set_menu_selection directly
rather than via scroll_menu, as sel is already known to be selectable.
(Not required for fixing the bug.)
src/bfu/menu.c (menu_search_handler): Break infinite loops also if
menu->selected is -1 initially.
src/bfu/menu.c (menu_handler): Instead of tweaking menu->selected
directly, let scroll_menu do it.
This fixes two bugs:
1. Pressing F9 did not make the main menu visible, but then pressing
e.g. Right made it visible.
2. Pressing F9 and then Down displayed the first submenu (File) at the
wrong position on the screen.
src/terminal/tab.c (get_tab_by_number): Assert that the returned
struct window * actually points to a struct window.
src/terminal/tab.c (move_current_tab): Keep tabs contiguous in the
stack of windows. Obey "ui.tabs.wraparound".
src/terminal/terminal.h (struct terminal): Documented that tabs can
move in the stack.
src/terminal/window.c (assert_window_stacking): Check that the main
menu isn't between tabs.
This fixes the bug that tabs opened with -remote used to hide existing
dialogs, which then became unusable until the new tabs were closed.
src/terminal/tab.c (init_tab): Put the new tab immediately above
existing ones, or if it's the first one, then at the bottom of the stack.
Added assertions.
src/terminal/terminal.h (struct terminal): Redocumented the stacking
order of windows.
src/terminal/window.c [CONFIG_DEBUG] (assert_window_stacking): New function.
src/terminal/window.h (assert_window_stacking): New function or no-op macro.
src/bfu/README: This new file currently contains a diagram of how the
various struct types of src/bfu/ and src/terminal/ relate to each
other. More documentation may be added later, although if it is
specific to a particular structure, then it should probably go in the
corresponding header file so that people will remember to update it.
doc/hacking.txt: Point to the ELinks-specific po/perl/README, rather
than to the generic po/perl/check-accelerator-conflicts.pl.
po/perl/README: Removed a spurious preposition.