diff options
author | Eduardo Chappa <chappa@washington.edu> | 2015-05-01 23:22:51 -0600 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2015-05-01 23:22:51 -0600 |
commit | 21aedc404d8e1bf637e810ee521e99472b1e1287 (patch) | |
tree | 69ab791ae71e69d99edcd281baecb6b25dd6d088 /alpine/titlebar.c | |
parent | e2e8488ca2d18f2b0eedaa1bfc6826e8a11de025 (diff) | |
download | alpine-21aedc404d8e1bf637e810ee521e99472b1e1287.tar.xz |
* new version 2.20.8.
* Make sure titlebar (the line at the top of the screen) always
contains the name of the folder/newsgroup that is open, if this fits
in the title.
* Fix a bug in the Windows version in which width of characters in the
width ambiguous zone was computed incorrectly. Reported by
Ulf-Dietrich Braumann.
Diffstat (limited to 'alpine/titlebar.c')
-rw-r--r-- | alpine/titlebar.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/alpine/titlebar.c b/alpine/titlebar.c index 35f462ad..d190460c 100644 --- a/alpine/titlebar.c +++ b/alpine/titlebar.c @@ -396,6 +396,8 @@ current_titlebar_color(void) "Title". The rule for existence is that in the space between 1) and 2) there must be one space between 3) and 4) AND at least 50% of 4) must be displayed. + However, if the folder name can be displayed, then do + so, and display as much as possible of the collection name. Returns - Formatted title bar ----*/ @@ -758,6 +760,15 @@ try_smaller_loc: else if(ss_len > 0 && ss_len <= avail){ q = fold_tmp; strncpy(q, ss_string, sizeof(fold_tmp)-(q-fold_tmp)); + } else if(fold_len < avail){ + q = fold_tmp; + if(fold_len + 7 < avail){ + *q++ = '<'; + q += utf8_pad_to_width(q, as.context_name, sizeof(fold_tmp)-(q-fold_tmp), avail - fold_len - 3, 1); + *q++ = '>'; + *q++ = ' '; + } + strncpy(q, as.folder_name, sizeof(fold_tmp)-(q-fold_tmp)); } /* else leave it out */ } |