diff options
author | Kevin McCarthy <kevin@8t8.us> | 2020-05-23 14:41:50 -0700 |
---|---|---|
committer | Kevin McCarthy <kevin@8t8.us> | 2020-05-23 14:48:58 -0700 |
commit | 0ac6b609cd9e4588f00221b5c66e0fd5f584da88 (patch) | |
tree | 9539bdb94172652c42b281be2b9bdf667079e383 /handler.c | |
parent | c44f0ce5de6865495d3fe61072a4245039476157 (diff) |
Refactor mutt_buffer_strip_formatting() inside of pager.c.
Rather than duplicate the logic, move the function back inside
pager.c. Add a parameter to optionally remove attachment markers.
Inside fill_buffer(), use a stack-based buffer and directly assign the
buffer.data back to fmt, to keep it as fast as before.
Diffstat (limited to 'handler.c')
-rw-r--r-- | handler.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -36,6 +36,7 @@ #include "charset.h" #include "mutt_crypt.h" #include "rfc3676.h" +#include "pager.h" #define BUFI_SIZE 1000 #define BUFO_SIZE 2000 @@ -1386,7 +1387,7 @@ static int autoview_handler (BODY *a, STATE *s) BUFFER *stripped = mutt_buffer_pool_get (); while (fgets (buffer, sizeof(buffer), fpout) != NULL) { - mutt_buffer_strip_formatting (stripped, buffer); + mutt_buffer_strip_formatting (stripped, buffer, 0); state_puts (s->prefix, s); state_puts (mutt_b2s (stripped), s); } |