X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=enter.c;h=4636c3abd56114dd434917543b0d39fee7dfda80;hp=356ab21de97b71e82c790d52ee721cc88dc603e5;hb=e96efa56257b45e9c3d1fb1b30071c57512cfe28;hpb=0d5798fa40d68a2cff1193196b9c4ddd67da5063 diff --git a/enter.c b/enter.c index 356ab21..4636c3a 100644 --- a/enter.c +++ b/enter.c @@ -32,6 +32,8 @@ enum M_REDRAW_LINE /* redraw entire line */ }; +static int _mutt_enter_string_foo (char *buf, size_t buflen, int y, int x, int flags, int multiple, char ***files, int *numfiles, ENTER_STATE *state, int att_save); + static int my_wcwidth (wchar_t wc) { int n = wcwidth (wc); @@ -184,9 +186,23 @@ int mutt_enter_string(char *buf, size_t buflen, int y, int x, int flags) return rv; } -int _mutt_enter_string (char *buf, size_t buflen, int y, int x, +int _mutt_enter_string(char *buf, size_t buflen, int y, int x, int flags, int multiple, char ***files, int *numfiles, ENTER_STATE *state) +{ + return _mutt_enter_string_foo(buf,buflen,y,x,flags,multiple,files,numfiles,state,0); +} + +int _mutt_enter_string_att(char *buf, size_t buflen, int y, int x, + int flags, int multiple, char ***files, int *numfiles, + ENTER_STATE *state) +{ + return _mutt_enter_string_foo(buf,buflen,y,x,flags,multiple,files,numfiles,state,1); +} + +static int _mutt_enter_string_foo (char *buf, size_t buflen, int y, int x, + int flags, int multiple, char ***files, int *numfiles, + ENTER_STATE *state, int att_save) /* the last parameter is a hack!! */ { int width = COLS - x - 1; int redraw; @@ -614,6 +630,12 @@ self_insert: /* use the raw keypress */ ch = LastKey; + if (att_save && ch == '.') + { + rv = 2; + goto bye; + } + #ifdef KEY_ENTER /* treat ENTER the same as RETURN */ if (ch == KEY_ENTER)