aboutsummaryrefslogtreecommitdiff
path: root/vim/autoload/mail.vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-05-10 10:38:50 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-05-10 10:38:50 +1200
commited2dfe06b1ad22d09af7fe7efc36555812c24aa5 (patch)
treeffc37ddaaf7ae67f2e7f81acc92f56493020a9b2 /vim/autoload/mail.vim
parentMerge branch 'release/v4.19.0' (diff)
parentBump VERSION (diff)
downloaddotfiles-ed2dfe06b1ad22d09af7fe7efc36555812c24aa5.tar.gz
dotfiles-ed2dfe06b1ad22d09af7fe7efc36555812c24aa5.zip
Merge branch 'release/v4.20.0'v4.20.0
* release/v4.20.0: Bump VERSION Update vim-juvenile to v0.4.0 Update vim-insert-suspend-hlsearch to v0.7.0 Update vim-insert-cancel to v3.3.0 Update vim-foldlevelstart-stdin to v0.2.0 Update vim-equalalways-resized to v0.2.0 Update vim-digraph-search to v0.2.0 Update vim-diff-prune to v1.3.0 Update vim-cursorline-current to v0.4.0 Update vim-copy-linebreak to v0.7.0 Update vim-colon-operator to v0.4.0 Update vim-cmdwin-ctrlc to v0.3.0 Update vim-big-file-options to v1.1.0 Remove unnecessary l: prefixes to Vim variables Remove unnecessary g: prefixes to Vim variables Remap g& to preserve substitution flags Bind \S in Vim to run :scriptnames
Diffstat (limited to 'vim/autoload/mail.vim')
-rw-r--r--vim/autoload/mail.vim38
1 files changed, 19 insertions, 19 deletions
diff --git a/vim/autoload/mail.vim b/vim/autoload/mail.vim
index f37a7865..40b7fb7f 100644
--- a/vim/autoload/mail.vim
+++ b/vim/autoload/mail.vim
@@ -1,16 +1,16 @@
" Add a header to a mail message
function! mail#AddHeaderField(name, body) abort
- let l:num = 0
- while l:num < line('$') && getline(l:num + 1) !=# ''
- let l:num += 1
+ let num = 0
+ while num < line('$') && getline(num + 1) !=# ''
+ let num += 1
endwhile
- call append(l:num, a:name.': '.a:body)
+ call append(num, a:name.': '.a:body)
endfunction
" Add a set of headers to a mail message
function! mail#AddHeaderFields(fields) abort
- for l:name in sort(keys(a:fields))
- call mail#AddHeaderField(l:name, a:fields[l:name])
+ for name in sort(keys(a:fields))
+ call mail#AddHeaderField(name, a:fields[name])
endfor
endfunction
@@ -39,43 +39,43 @@ function! mail#NewBlank(count, up, visual) abort
endif
" Flag for whether we've started a block
- let l:block = 0
+ let block = 0
" Flag for the number of blocks passed
- let l:blocks = 0
+ let blocks = 0
" Iterate through buffer lines
- let l:num = line('.')
- while a:up ? l:num > 1 : l:num < line('$')
+ let num = line('.')
+ while a:up ? num > 1 : num < line('$')
" If the line is blank
- if getline(l:num) =~# '^[ >]*$'
+ if getline(num) =~# '^[ >]*$'
" If we'd moved through a non-blank block already, reset that flag and
" bump up the block count
- if l:block
- let l:block = 0
- let l:blocks += 1
+ if block
+ let block = 0
+ let blocks += 1
endif
" If we've hit the number of blocks, end the loop
- if l:blocks == a:count
+ if blocks == a:count
break
endif
" If the line is not blank, flag that we're going through a block
else
- let l:block = 1
+ let block = 1
endif
" Move the line number or up or down depending on direction
- let l:num += a:up ? -1 : 1
+ let num += a:up ? -1 : 1
endwhile
" Move to line if nonzero and not equal to the current line
- if l:num != line('.')
- execute 'normal '.l:num.'G'
+ if num != line('.')
+ execute 'normal '.num.'G'
endif
endfunction