Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: some window local options are stored as numbers instead of booleans #133

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion lua/true-zen/minimalist.lua
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,17 @@ local function save_opts()
-- get the options from suitable_window
for user_opt, val in pairs(cnf.modes.minimalist.options) do
local opt = fn.gettabwinvar(currtab, suitable_window, "&" .. user_opt)
original_opts[user_opt] = (type(opt) == "number" and (opt == 1 and true or false) or opt)
if
type(opt) == "string"
or user_opt == "showtabline"
or user_opt == "cmdheight"
or user_opt == "laststatus"
or user_opt == "numberwidth"
then
original_opts[user_opt] = opt
else
original_opts[user_opt] = opt == 1
end
o[user_opt] = val
end

Expand Down