Skip to content

Commit

Permalink
reduce if condition
Browse files Browse the repository at this point in the history
  • Loading branch information
windwp committed Jun 13, 2021
1 parent a939a0e commit 90448ec
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lua/nvim-autopairs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,10 @@ M.autopairs_map = function(bufnr, char)
then
local end_pair = rule:get_end_pair(cond_opt)
local move_text = utils.repeat_key(utils.key.join_left,#end_pair)
if rule.key_map and #rule.key_map >1 then move_text ="" end

if add_char == 0 then char = "" end
if add_char == 0 then
move_text =""
char = ""
end
return utils.esc(char .. end_pair .. move_text)
end
end
Expand Down

0 comments on commit 90448ec

Please sign in to comment.