vmail 0.8.6 → 0.8.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/lib/vmail.vim +32 -9
  2. data/lib/vmail/version.rb +1 -1
  3. metadata +3 -3
@@ -52,6 +52,7 @@ function! s:create_list_window()
52
52
  setlocal cursorline
53
53
  " we need the bufnr to find the window later
54
54
  let s:listbufnr = bufnr('%')
55
+ let s:listbufname = bufname('%')
55
56
  setlocal statusline=%!VmailStatusLine()
56
57
  call s:message_list_window_mappings()
57
58
  endfunction
@@ -110,29 +111,51 @@ endfunction
110
111
 
111
112
  " from message window
112
113
  function! s:show_next_message()
113
- call s:focus_list_window()
114
- execute "normal j"
115
- execute "normal \<cr>"
114
+ let fullscreen = (bufwinnr(s:listbufnr) == -1) " we're in full screen message mode
115
+ if fullscreen
116
+ 3split
117
+ exec 'b'. s:listbufnr
118
+ else
119
+ call s:focus_list_window()
120
+ end
121
+ normal j
122
+ call s:show_message(1)
123
+ normal zz
124
+ wincmd p
125
+ redraw
116
126
  endfunction
117
127
 
118
128
  function! s:show_previous_message()
119
- call s:focus_list_window()
120
- execute "normal k"
129
+ set lazyredraw " why doesn't this work? Keep it in anyway
130
+ let fullscreen = (bufwinnr(s:listbufnr) == -1) " we're in full screen message mode
131
+ if fullscreen
132
+ 3split
133
+ exec 'b'. s:listbufnr
134
+ else
135
+ call s:focus_list_window()
136
+ end
137
+ normal k
121
138
  if line('.') != 1
122
- execute "normal \<cr>"
139
+ call s:show_message(1)
123
140
  endif
141
+ normal zz
142
+ wincmd p
143
+ redraw
124
144
  endfunction
125
145
 
146
+
126
147
  " from message list window
127
148
  function! s:show_next_message_in_list()
128
149
  if line('.') != line('$')
129
- call feedkeys("j\<cr>\<cr>")
150
+ normal j
151
+ call s:show_message(1)
130
152
  endif
131
153
  endfunction
132
154
 
133
155
  function! s:show_previous_message_in_list()
134
156
  if line('.') != 1
135
- call feedkeys("k\<cr>\<cr>")
157
+ normal k
158
+ call s:show_message(1)
136
159
  endif
137
160
  endfunction
138
161
 
@@ -720,7 +743,7 @@ endfunc
720
743
  " MAPPINGS
721
744
 
722
745
  func! s:message_window_mappings()
723
- noremap <silent> <buffer> <cr> :call <SID>focus_list_window()<CR>
746
+ noremap <silent> <buffer> <cr> <C-W>=:call <SID>focus_list_window()<CR>
724
747
  noremap <silent> <buffer> <Leader>r :call <SID>compose_reply(0)<CR>
725
748
  noremap <silent> <buffer> <Leader>a :call <SID>compose_reply(1)<CR>
726
749
  noremap <silent> <buffer> <Leader>R :call <SID>show_raw()<cr>
@@ -1,3 +1,3 @@
1
1
  module Vmail
2
- VERSION = "0.8.6"
2
+ VERSION = "0.8.7"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 8
8
- - 6
9
- version: 0.8.6
8
+ - 7
9
+ version: 0.8.7
10
10
  platform: ruby
11
11
  authors:
12
12
  - Daniel Choi
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-12-18 00:00:00 -05:00
17
+ date: 2010-12-19 00:00:00 -05:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency