diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2025-02-24 02:24:22 +0300 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2025-02-24 02:24:22 +0300 |
commit | 53dfbfec4bd58615eb049ed0cd06fdf8e2844360 (patch) | |
tree | 2fb5f1d257eb02896c394958076f674a448e6fda /src/interface-curses | |
parent | c667b14942c5c32d41dcb7cb63a90c39621546d4 (diff) | |
download | sciteco-53dfbfec4bd58615eb049ed0cd06fdf8e2844360.tar.gz |
Curses: avoid completing filenames when clicking the upper border of the popup window
Diffstat (limited to 'src/interface-curses')
-rw-r--r-- | src/interface-curses/curses-info-popup.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/interface-curses/curses-info-popup.c b/src/interface-curses/curses-info-popup.c index e470879..dffbcf8 100644 --- a/src/interface-curses/curses-info-popup.c +++ b/src/interface-curses/curses-info-popup.c @@ -213,6 +213,7 @@ teco_curses_info_popup_show(teco_curses_info_popup_t *ctx, attr_t attr) * popup is cleared. * * @note This must match the calculations in teco_curses_info_popup_init_pad(). + * But we could perhaps also cache these values. */ const teco_string_t * teco_curses_info_popup_getentry(teco_curses_info_popup_t *ctx, gint y, gint x) @@ -221,6 +222,9 @@ teco_curses_info_popup_getentry(teco_curses_info_popup_t *ctx, gint y, gint x) gint pad_cols; /**! entry columns */ gint pad_colwidth; /**! width per entry column */ + if (y == 0) + return NULL; + /* * With Unicode icons enabled, we reserve 2 characters at the beginning and one * after the filename/directory. |