Fix display/UI crash and correctness bugs (@sirus20x6)

This commit is contained in:
rakshasa
2026-03-16 16:01:36 +01:00
committed by Jari Sundell
parent 674ae767aa
commit 38fc815d52
7 changed files with 15 additions and 11 deletions
+5 -3
View File
@@ -167,6 +167,8 @@ ElementDownloadList::receive_home() {
void
ElementDownloadList::receive_end() {
if (m_view->size_visible() == 0)
return;
m_view->set_focus(m_view->end_visible() - 1);
m_view->set_last_changed();
}
@@ -221,10 +223,10 @@ ElementDownloadList::receive_change_view(const std::string& name) {
std::string old_name = view() ? view()->name() : "";
if (!old_name.empty())
rpc::commands.call_catch("event.view.hide", rpc::make_target(), name, "View hide event action failed: ");
rpc::commands.call_catch("event.view.hide", rpc::make_target(), old_name, "View hide event action failed: ");
set_view(*itr);
if (!old_name.empty())
rpc::commands.call_catch("event.view.show", rpc::make_target(), old_name, "View show event action failed: ");
if (!name.empty())
rpc::commands.call_catch("event.view.show", rpc::make_target(), name, "View show event action failed: ");
}
void
+1 -1
View File
@@ -496,7 +496,7 @@ Root::set_keymap_style(const std::string& style) {
} else if (style == "emacs") {
m_keymap = emacs_keymap;
} else {
throw torrent::input_error("Root::set_keymap_style() -> ui.keymap.style is configured with unknown keymap style: " + m_keymap_style);
throw torrent::input_error("Root::set_keymap_style() -> ui.keymap.style is configured with unknown keymap style: " + style);
}
m_keymap_style = style;