Skip to content

Commit 157cc45

Browse files
committed
use match case equality
1 parent fa6d6eb commit 157cc45

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

autoload/nnn.vim

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ function! s:popup(opts, term_opts)
110110
let l:highlight = get(a:opts, 'highlight', 'Comment')
111111

112112
if has('nvim')
113-
let l:borderchars = map(l:border == 'rounded'
113+
let l:borderchars = map(l:border ==# 'rounded'
114114
\ ? ['', '' ,'', '', '', '', '', '' ]
115115
\ : ['', '' ,'', '', '', '', '', '' ],
116116
\ {_, val -> [v:val, l:highlight]})
@@ -129,7 +129,7 @@ function! s:popup(opts, term_opts)
129129
return { 'buf': s:create_term_buf(a:term_opts), 'winhandle': l:win }
130130
else
131131
let l:buf = s:create_term_buf(extend(a:term_opts, #{ curwin: 0, hidden: 1 }))
132-
let l:borderchars = l:.border == 'rounded'
132+
let l:borderchars = l:.border ==# 'rounded'
133133
\ ? ['', '', '', '', '', '','' , '']
134134
\ : ['', '', '', '', '', '', '', '']
135135
let l:win = popup_create(l:buf, #{
@@ -151,7 +151,7 @@ function! s:switch_back(opts, Cmd)
151151
let l:term = a:opts.term
152152

153153
" when split explorer
154-
if type(l:layout) == v:t_string && l:layout == 'enew' && bufexists(l:buf)
154+
if type(l:layout) == v:t_string && l:layout ==# 'enew' && bufexists(l:buf)
155155
execute 'keepalt b' l:buf
156156
elseif s:present(l:layout, 'window')
157157
if type(l:layout.window) != v:t_dict
@@ -167,8 +167,8 @@ function! s:switch_back(opts, Cmd)
167167

168168
" don't switch when action = 'edit' and just retain the window
169169
" don't switch when layout = 'enew' for split explorer feature
170-
if (type(a:Cmd) == v:t_string && a:Cmd != 'edit')
171-
\ || (type(l:layout) != v:t_string || (type(l:layout) == v:t_string && l:layout != 'enew'))
170+
if (type(a:Cmd) == v:t_string && a:Cmd !=# 'edit')
171+
\ || (type(l:layout) != v:t_string || (type(l:layout) == v:t_string && l:layout !=# 'enew'))
172172
silent! execute 'tabnext' a:opts.ppos.tab
173173
silent! execute a:opts.ppos.win.'wincmd w'
174174
endif

0 commit comments

Comments
 (0)