turn all != into !=# or !=? when comparing strings
This commit is contained in:
parent
9ada4d2041
commit
6716ba709f
@ -423,7 +423,7 @@ function! vimwiki#base#open_link(cmd, link, ...) "{{{
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
let update_prev_link = ( (scheme == '' || scheme =~ 'wiki' || scheme =~ 'diary')
|
let update_prev_link = ( (scheme == '' || scheme =~ 'wiki' || scheme =~ 'diary')
|
||||||
\ && lnk != expand('%:t:r')
|
\ && !vimwiki#path#is_equal(lnk, expand('%:t:r'))
|
||||||
\ ? 1 : 0)
|
\ ? 1 : 0)
|
||||||
|
|
||||||
let use_system_open = (
|
let use_system_open = (
|
||||||
@ -1319,7 +1319,7 @@ function! vimwiki#base#rename_link() "{{{
|
|||||||
|
|
||||||
" restore wiki buffers
|
" restore wiki buffers
|
||||||
for bitem in blist
|
for bitem in blist
|
||||||
if bitem[0] != cur_buffer[0]
|
if !vimwiki#path#is_equal(bitem[0], cur_buffer[0])
|
||||||
call s:open_wiki_buffer(bitem)
|
call s:open_wiki_buffer(bitem)
|
||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
@ -1751,16 +1751,16 @@ endfunction " }}}
|
|||||||
" s:clean_url
|
" s:clean_url
|
||||||
function! s:clean_url(url) " {{{
|
function! s:clean_url(url) " {{{
|
||||||
let url = split(a:url, '/\|=\|-\|&\|?\|\.')
|
let url = split(a:url, '/\|=\|-\|&\|?\|\.')
|
||||||
let url = filter(url, 'v:val != ""')
|
let url = filter(url, 'v:val !=# ""')
|
||||||
let url = filter(url, 'v:val != "www"')
|
let url = filter(url, 'v:val !=# "www"')
|
||||||
let url = filter(url, 'v:val != "com"')
|
let url = filter(url, 'v:val !=# "com"')
|
||||||
let url = filter(url, 'v:val != "org"')
|
let url = filter(url, 'v:val !=# "org"')
|
||||||
let url = filter(url, 'v:val != "net"')
|
let url = filter(url, 'v:val !=# "net"')
|
||||||
let url = filter(url, 'v:val != "edu"')
|
let url = filter(url, 'v:val !=# "edu"')
|
||||||
let url = filter(url, 'v:val != "http\:"')
|
let url = filter(url, 'v:val !=# "http\:"')
|
||||||
let url = filter(url, 'v:val != "https\:"')
|
let url = filter(url, 'v:val !=# "https\:"')
|
||||||
let url = filter(url, 'v:val != "file\:"')
|
let url = filter(url, 'v:val !=# "file\:"')
|
||||||
let url = filter(url, 'v:val != "xml\:"')
|
let url = filter(url, 'v:val !=# "xml\:"')
|
||||||
return join(url, " ")
|
return join(url, " ")
|
||||||
endfunction " }}}
|
endfunction " }}}
|
||||||
|
|
||||||
|
@ -966,7 +966,7 @@ function! s:process_tag_h(line, id) "{{{
|
|||||||
let h_id = s:safe_html_anchor(h_text)
|
let h_id = s:safe_html_anchor(h_text)
|
||||||
let centered = (a:line =~ '^\s')
|
let centered = (a:line =~ '^\s')
|
||||||
|
|
||||||
if h_text != g:vimwiki_toc_header
|
if h_text !=# g:vimwiki_toc_header
|
||||||
|
|
||||||
let a:id[h_level-1] = [h_text, a:id[h_level-1][1]+1]
|
let a:id[h_level-1] = [h_text, a:id[h_level-1][1]+1]
|
||||||
|
|
||||||
|
@ -188,7 +188,7 @@ function! s:get_level(lnum) "{{{
|
|||||||
if getline(a:lnum) =~ '^\s*$'
|
if getline(a:lnum) =~ '^\s*$'
|
||||||
return 0
|
return 0
|
||||||
endif
|
endif
|
||||||
if VimwikiGet('syntax') != 'media'
|
if VimwikiGet('syntax') !=? 'media'
|
||||||
let level = indent(a:lnum)
|
let level = indent(a:lnum)
|
||||||
else
|
else
|
||||||
let level = s:string_length(matchstr(getline(a:lnum), s:rx_bullet_chars))-1
|
let level = s:string_length(matchstr(getline(a:lnum), s:rx_bullet_chars))-1
|
||||||
@ -1112,7 +1112,7 @@ endfunction "}}}
|
|||||||
function! s:set_new_mrkr(item, new_mrkr) "{{{
|
function! s:set_new_mrkr(item, new_mrkr) "{{{
|
||||||
if a:item.type == 0
|
if a:item.type == 0
|
||||||
call s:substitute_rx_in_line(a:item.lnum, '^\s*\zs\ze', a:new_mrkr.' ')
|
call s:substitute_rx_in_line(a:item.lnum, '^\s*\zs\ze', a:new_mrkr.' ')
|
||||||
if indent(a:item.lnum) == 0 && VimwikiGet('syntax') != 'media'
|
if indent(a:item.lnum) == 0 && VimwikiGet('syntax') !=? 'media'
|
||||||
call s:set_indent(a:item.lnum, vimwiki#lst#get_list_margin())
|
call s:set_indent(a:item.lnum, vimwiki#lst#get_list_margin())
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
@ -1223,7 +1223,7 @@ function! s:clone_marker_from_to(from, to) "{{{
|
|||||||
if item_from.type == 0 | return | endif
|
if item_from.type == 0 | return | endif
|
||||||
let new_mrkr = item_from.mrkr . ' '
|
let new_mrkr = item_from.mrkr . ' '
|
||||||
call s:substitute_rx_in_line(a:to, '^\s*', new_mrkr)
|
call s:substitute_rx_in_line(a:to, '^\s*', new_mrkr)
|
||||||
let new_indent = ( VimwikiGet('syntax') != 'media' ? indent(a:from) : 0 )
|
let new_indent = ( VimwikiGet('syntax') !=? 'media' ? indent(a:from) : 0 )
|
||||||
call s:set_indent(a:to, new_indent)
|
call s:set_indent(a:to, new_indent)
|
||||||
if item_from.cb != ''
|
if item_from.cb != ''
|
||||||
call s:create_cb(s:get_item(a:to))
|
call s:create_cb(s:get_item(a:to))
|
||||||
|
Loading…
Reference in New Issue
Block a user