diff --git a/mless b/mless index ddead98..cd30767 100755 --- a/mless +++ b/mless @@ -89,7 +89,8 @@ while :; do LESSOPEN="|$0 --filter %s" \ less -Ps"mless %f?m (message %i of %m).." -R \ "+:e $(mscan -n .)$nl" //scan $(mscan -n :) - case "$?" in + _c="$?" + case "$_c" in 0|1) exit $?;; 36) # $ goto end mseq -C '$' 2>/dev/null @@ -105,6 +106,10 @@ while :; do mseq -f : | mseq -S mseq -C + ;; + 117) # u extract URLs + _url="$(mshow -N -h ''| extract_url -l -c "$XDG_CONFIG_HOME"/urlview/config 2>&- | fzf)" + [ "$_url" != "" ] && handle-url "$_url" + ;; 82) # R toggle raw mode MLESS_RAW=$((1-$MLESS_RAW)) ;; diff --git a/mthread.c b/mthread.c index 77fb21e..5ee9245 100644 --- a/mthread.c +++ b/mthread.c @@ -164,6 +164,15 @@ thread(char *file) if (me == c) continue; + // ugly, skip fake Protonmail mids + char *at = strchr(mid, '@'); + if (at != NULL) { + const char *pi = "@protonmail.internalid"; + const char *pc = "@protonmail.conversationid"; + if (strcmp(at, pi) == 0 || strcmp(at, pc) == 0) + continue; + } + if (parent && !me->parent && !reachable(me, parent) && !reachable(parent, me)) { me->parent = parent;