diff options
author | Eduardo Chappa <chappa@washington.edu> | 2015-03-25 20:27:02 -0600 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2015-03-25 20:27:02 -0600 |
commit | 3a9d4c01e5135f6d5b2aecdaf698d1d960387df9 (patch) | |
tree | 01b45596b7334d2f9d1298f099ca4f037f2e69b7 /alpine/confscroll.c | |
parent | 955a543f9ac3bb29b88a42d0520ac68324c2f6fa (diff) | |
download | alpine-3a9d4c01e5135f6d5b2aecdaf698d1d960387df9.tar.xz |
* new version 2.20.4
* If the charset of a message can not be determined, use the value set
in the "Unknown Character Set" option.
* Resizing setup screen will redraw screen.
* Unix Alpine only. Experimental: If Alpine/Pico finds a UCS4 code
in the width ambiguous zone, it will use other means to determine
the width, such as call wcwidth.
Diffstat (limited to 'alpine/confscroll.c')
-rw-r--r-- | alpine/confscroll.c | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/alpine/confscroll.c b/alpine/confscroll.c index 53c2c82a..efa8dc4e 100644 --- a/alpine/confscroll.c +++ b/alpine/confscroll.c @@ -458,7 +458,7 @@ save_include(struct pine *ps, struct variable *v, int allow_hard_to_config_remot * this function. */ int -conf_scroll_screen(struct pine *ps, OPT_SCREEN_S *screen, CONF_S *start_line, char *title, char *pdesc, int multicol) +conf_scroll_screen(struct pine *ps, OPT_SCREEN_S *screen, CONF_S *start_line, char *title, char *pdesc, int multicol, int *pos) { char tmp[MAXPATH+1]; char *utf8str; @@ -1317,6 +1317,11 @@ no_down: case MC_RESIZE: ClearScreen(); ps->mangled_screen = 1; + if(pos){ + *pos = get_confline_number(screen->current); + done++; + retval = 0; + } break; default: @@ -4716,6 +4721,27 @@ snip_confline(CONF_S **p) } } +int +get_confline_number(CONF_S *conf) +{ + int pos; + CONF_S *p; + + for (p = first_confline(conf), pos = 0; p != conf; p = next_confline(p), pos++); + + return pos; +} + + +CONF_S * +set_confline_number(CONF_S *conf, int pos) +{ + CONF_S *p; + int i; + for(p = first_confline(conf), i = 0; p && i < pos; p=next_confline(p), i++); + return p; +} + /* * |