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

When active input line was destroyed, irssi didn't set active_entry to NULL.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1823 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-10-13 16:59:03 +00:00 committed by cras
parent 6924eec71f
commit 7e56ccba1e

View File

@ -43,6 +43,9 @@ void gui_entry_destroy(GUI_ENTRY_REC *entry)
{ {
g_return_if_fail(entry != NULL); g_return_if_fail(entry != NULL);
if (active_entry == entry)
gui_entry_set_active(NULL);
g_free_not_null(entry->prompt); g_free_not_null(entry->prompt);
g_string_free(entry->text, TRUE); g_string_free(entry->text, TRUE);
g_free(entry); g_free(entry);
@ -148,9 +151,11 @@ void gui_entry_set_active(GUI_ENTRY_REC *entry)
{ {
active_entry = entry; active_entry = entry;
screen_move_cursor(entry->xpos + entry->scrpos + entry->promptlen, if (entry != NULL) {
entry->ypos); screen_move_cursor(entry->xpos + entry->scrpos +
screen_refresh(NULL); entry->promptlen, entry->ypos);
screen_refresh(NULL);
}
} }
void gui_entry_set_prompt(GUI_ENTRY_REC *entry, const char *str) void gui_entry_set_prompt(GUI_ENTRY_REC *entry, const char *str)