From: Gaute Hope <eg@gaute.vetsj.com>
To: sup-devel <sup-devel@rubyforge.org>
Subject: Fix attachment delete off-by-one
Date: Sun, 25 Sep 2011 15:56:13 +0200 [thread overview]
Message-ID: <1316958820-sup-2638@qwerzila> (raw)
[-- Attachment #1: Type: text/plain, Size: 215 bytes --]
Hi,
deleting attachments with 'd' in edit-mode is off-by-one (you needed to
select the line above the attachment). Attached patch fixes this issue.
(Perhaps introduced with the account selector ?)
Regards,
Gaute
[-- Attachment #2: 0001-Fix-attachment-off-by-one-line-selection-in-edit-mes.patch --]
[-- Type: application/octet-stream, Size: 915 bytes --]
From b85798280484628b4ace525250a999d99e7bc480 Mon Sep 17 00:00:00 2001
From: Gaute Hope <eg@gaute.vetsj.com>
Date: Sun, 25 Sep 2011 15:50:03 +0200
Subject: [PATCH] Fix attachment off-by-one line selection in
edit-message-mode
---
lib/sup/modes/edit-message-mode.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/sup/modes/edit-message-mode.rb b/lib/sup/modes/edit-message-mode.rb
index 17ffadb..fb52990 100644
--- a/lib/sup/modes/edit-message-mode.rb
+++ b/lib/sup/modes/edit-message-mode.rb
@@ -282,7 +282,7 @@ EOS
end
def delete_attachment
- i = curpos - @attachment_lines_offset - DECORATION_LINES - 1
+ i = curpos - @attachment_lines_offset - DECORATION_LINES - 2
if i >= 0 && i < @attachments.size && BufferManager.ask_yes_or_no("Delete attachment #{@attachment_names[i]}?")
@attachments.delete_at i
@attachment_names.delete_at i
--
1.7.6.3
reply other threads:[~2011-09-25 13:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1316958820-sup-2638@qwerzila \
--to=eg@gaute.vetsj.com \
--cc=sup-devel@rubyforge.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox