Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id A8F71431FD0 for ; Sat, 2 Nov 2013 07:04:19 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zU2X7WaG2q0j for ; Sat, 2 Nov 2013 07:04:15 -0700 (PDT) Received: from mail-oa0-f54.google.com (mail-oa0-f54.google.com [209.85.219.54]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 732FA429E35 for ; Sat, 2 Nov 2013 07:03:24 -0700 (PDT) Received: by mail-oa0-f54.google.com with SMTP id o20so5697911oag.27 for ; Sat, 02 Nov 2013 07:03:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=xKRPWfGNXjHRubWh3Gq1lxOi+XlB8TdPjFoqIeSVGao=; b=AVXtMMwudHhTzcbNlVNWf8ToDqdwpfcGQPyiig0O1E+Fr55EGVVl/G406D/swd3p8B Lsr6COgNvzndH3wsKq6t59D0Ufyis4y1YUkA7xyBZgbgxVS7HJ5XDBXHdcKUzlN95peL IMUFo7JzURPoTBPUMFFb4ZEEt7BJZ0PDyPM0vqitQVzly3APqB18Ow7yQgmgHxi+5Kms tB6mtxyuqt3FDgPEmt4x+vtQEitGFxPetL0PckvEn/APLAgQAsessxAOrkEQ5iRkrqOq qGKKZSgfCuBSNKXv3/6AY4dSUPSvv30WK6qLwYMdBlW6iwtr0Ky6vhLRHy9M8CoFbuJy Pcfw== X-Received: by 10.182.72.234 with SMTP id g10mr6502989obv.21.1383401003998; Sat, 02 Nov 2013 07:03:23 -0700 (PDT) Received: from localhost (187-162-140-241.static.axtel.net. [187.162.140.241]) by mx.google.com with ESMTPSA id jz7sm24739781oeb.4.2013.11.02.07.03.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 02 Nov 2013 07:03:23 -0700 (PDT) From: Felipe Contreras To: notmuch@notmuchmail.org Subject: [PATCH 19/21] vim: remove unnecessary buffer queue Date: Sat, 2 Nov 2013 07:55:52 -0600 Message-Id: <1383400554-1832-20-git-send-email-felipe.contreras@gmail.com> X-Mailer: git-send-email 1.8.4.2+fc1 In-Reply-To: <1383400554-1832-1-git-send-email-felipe.contreras@gmail.com> References: <1383400554-1832-1-git-send-email-felipe.contreras@gmail.com> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Nov 2013 14:04:20 -0000 Vim handles the buffers just fine: when one is deleted, we go to the previous one. Signed-off-by: Felipe Contreras --- vim/notmuch.vim | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/vim/notmuch.vim b/vim/notmuch.vim index fc9eaa2..9109470 100644 --- a/vim/notmuch.vim +++ b/vim/notmuch.vim @@ -65,7 +65,6 @@ function! s:new_file_buffer(type, fname) execute printf('set filetype=notmuch-%s', a:type) execute printf('set syntax=notmuch-%s', a:type) ruby $curbuf.init(VIM::evaluate('a:type')) - ruby $buf_queue.push($curbuf.number) endfunction function! s:compose_unload() @@ -268,13 +267,8 @@ endfunction function! s:kill_this_buffer() ruby << EOF - if $buf_queue.size > 1 - $curbuf.close - VIM::command("bdelete!") - $buf_queue.pop - b = $buf_queue.last - VIM::command("buffer #{b}") if b - end + $curbuf.close + VIM::command("bdelete!") EOF endfunction @@ -293,7 +287,6 @@ function! s:new_buffer(type) execute printf('set filetype=notmuch-%s', a:type) execute printf('set syntax=notmuch-%s', a:type) ruby $curbuf.init(VIM::evaluate('a:type')) - ruby $buf_queue.push($curbuf.number) endfunction function! s:set_menu_buffer() @@ -471,7 +464,6 @@ ruby << EOF $db_name = nil $email = $email_name = $email_address = nil $searches = [] - $buf_queue = [] $threads = [] $messages = [] $config = {} -- 1.8.4.2+fc1