Skip to content

Commit

Permalink
fix(keys): Use vim's default value for an unset g:mapleader (#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsakirist committed Jan 4, 2023
1 parent d5e6bdf commit 3bde7b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/lazy/core/handler/keys.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ local M = {}

---@param feed string
function M.replace_special(feed)
for special, key in pairs({ leader = vim.g.mapleader, localleader = vim.g.maplocalleader }) do
for special, key in pairs({ leader = vim.g.mapleader or "\\", localleader = vim.g.maplocalleader or "\\" }) do
local pattern = "<"
for i = 1, #special do
pattern = pattern .. "[" .. special:sub(i, i) .. special:upper():sub(i, i) .. "]"
Expand Down

0 comments on commit 3bde7b5

Please sign in to comment.