summaryrefslogtreecommitdiff
path: root/src/fe-text
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-10-13 16:59:03 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-10-13 16:59:03 +0000
commit7e56ccba1e40ffa6a2d55e67d7e86c4a63f62193 (patch)
treedfb53531f02df495c33e920e37d7472e518f4b4b /src/fe-text
parent6924eec71fb43e711dcf7e056cf2e379982ac866 (diff)
downloadirssi-7e56ccba1e40ffa6a2d55e67d7e86c4a63f62193.zip
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
Diffstat (limited to 'src/fe-text')
-rw-r--r--src/fe-text/gui-entry.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/fe-text/gui-entry.c b/src/fe-text/gui-entry.c
index 84a7cd7a..3af35eba 100644
--- a/src/fe-text/gui-entry.c
+++ b/src/fe-text/gui-entry.c
@@ -43,6 +43,9 @@ void gui_entry_destroy(GUI_ENTRY_REC *entry)
{
g_return_if_fail(entry != NULL);
+ if (active_entry == entry)
+ gui_entry_set_active(NULL);
+
g_free_not_null(entry->prompt);
g_string_free(entry->text, TRUE);
g_free(entry);
@@ -148,9 +151,11 @@ void gui_entry_set_active(GUI_ENTRY_REC *entry)
{
active_entry = entry;
- screen_move_cursor(entry->xpos + entry->scrpos + entry->promptlen,
- entry->ypos);
- screen_refresh(NULL);
+ if (entry != NULL) {
+ screen_move_cursor(entry->xpos + entry->scrpos +
+ entry->promptlen, entry->ypos);
+ screen_refresh(NULL);
+ }
}
void gui_entry_set_prompt(GUI_ENTRY_REC *entry, const char *str)