diff options
| author | Clint Adams <clint@users.sourceforge.net> | 2007-10-19 20:21:28 +0000 |
|---|---|---|
| committer | Clint Adams <clint@users.sourceforge.net> | 2007-10-19 20:21:28 +0000 |
| commit | c32078a813db4368402e25fae07ad0cdca69d397 (patch) | |
| tree | 099ca7bd09440c9f99223aeab04d6dc3783cc64e | |
| parent | 23994: tweaks for 23993. (diff) | |
| download | zsh-c32078a813db4368402e25fae07ad0cdca69d397.tar zsh-c32078a813db4368402e25fae07ad0cdca69d397.tar.gz zsh-c32078a813db4368402e25fae07ad0cdca69d397.tar.bz2 zsh-c32078a813db4368402e25fae07ad0cdca69d397.tar.lz zsh-c32078a813db4368402e25fae07ad0cdca69d397.tar.xz zsh-c32078a813db4368402e25fae07ad0cdca69d397.tar.zst zsh-c32078a813db4368402e25fae07ad0cdca69d397.zip | |
23997: don't delete color pair hash on module unload unless it's been previously initialized.
| -rw-r--r-- | ChangeLog | 3 | ||||
| -rw-r--r-- | Src/Modules/curses.c | 5 |
2 files changed, 6 insertions, 2 deletions
@@ -1,5 +1,8 @@ 2007-10-19 Clint Adams <clint@zsh.org> + * 23997: Src/Modules/curses.c: don't delete color pair hash + on module unload unless it's been previously initialized. + * 23994: Completion/Unix/Command/_git: tweaks for 23993. * Mikael Magnusson: 23993: Completion/Unix/Command/_git: improved diff --git a/Src/Modules/curses.c b/Src/Modules/curses.c index ecd235d9c..6b2d0a4d4 100644 --- a/Src/Modules/curses.c +++ b/Src/Modules/curses.c @@ -58,7 +58,7 @@ static WINDOW *win_zero; static struct ttyinfo saved_tty_state; static struct ttyinfo curses_tty_state; static LinkList zcurses_windows; -static HashTable zcurses_colorpairs; +static HashTable zcurses_colorpairs = NULL; #define ZCURSES_ERANGE 1 #define ZCURSES_EDEFINED 2 @@ -599,7 +599,8 @@ int cleanup_(Module m) { freelinklist(zcurses_windows, (FreeFunc) zcurses_free_window); - deletehashtable(zcurses_colorpairs); + if (zcurses_colorpairs) + deletehashtable(zcurses_colorpairs); return setfeatureenables(m, &module_features, NULL); } |
