Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the message list bug #216

Merged
merged 1 commit into from
Oct 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions vim/autoload/himalaya/msg.vim
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ function! s:format_msg_for_list(msg)
let flag_flagged = index(a:msg.flags, "Flagged") == -1 ? " " : "!"
let flag_replied = index(a:msg.flags, "Answered") == -1 ? " " : "↵"
let msg.flags = printf("%s %s %s", flag_new, flag_replied, flag_flagged)
let msg.subject = a:msg.headers.subject
let msg.sender = a:msg.headers.from[0]
let msg.subject = a:msg.subject
let msg.sender = a:msg.sender
let msg.date = a:msg.date
return msg
endfunction
Expand Down Expand Up @@ -67,11 +67,11 @@ function! himalaya#msg#read()
\printf("Fetching message %d", s:msg_id),
\1,
\)
let attachment = len(msg.attachments) > 0 ? " []" : ""
let attachment = msg.hasAttachment ? " []" : ""
execute printf("silent! edit Himalaya read message [%d]%s", s:msg_id, attachment)
setlocal modifiable
silent execute "%d"
call append(0, split(substitute(msg.body.plain, "\r", "", "g"), "\n"))
call append(0, split(substitute(msg.content, "\r", "", "g"), "\n"))
silent execute "$d"
setlocal filetype=himalaya-msg-read
let &modified = 0
Expand Down