Skip to content

Commit

Permalink
Merge pull request #91 from Cassin01/develop
Browse files Browse the repository at this point in the history
version 0.9.0 fix #90
  • Loading branch information
Cassin01 authored May 5, 2023
2 parents 9ba719a + cae9cd3 commit 4be8b4c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ require("lazy").setup({{"Cassin01/wf.nvim", config = function() require("wf").se

## Getting started

There is no required dependencies on `wf.nvim` but Neovim >= 0.8.1 and
<!-- There is no required dependencies on `wf.nvim` but -->
Neovim >= 0.9.0 and
[nvim-web-devicons](https://github.com/nvim-tree/nvim-web-devicons) is recommended
for enjoying all the features of `wf.nvim`.

Expand Down Expand Up @@ -346,8 +347,8 @@ require("wf").select({happy = "😊", sad = "😥"}, {
skip_back_duplication = true,
},
}, function(text, key)
-- You feel happy.
vim.notify("You feel " .. key .. ".")
-- You feel happy😊.
vim.notify("You feel " .. key .. text .. ".")
end)
end
```
Expand Down
2 changes: 1 addition & 1 deletion lua/wf/common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ local function open_win(buf, height, row_offset, opts, cursor, title)
title_pos = "center",
noautocmd = true,
}
if vim.v.version <= 800 then
if vim.fn.has("nvim-0.9.0") == 0 then
conf_["title"] = nil
conf_["title_pos"] = nil
end
Expand Down
6 changes: 3 additions & 3 deletions lua/wf/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ local function swap_win_pos(up, down, style)
vim.fn.extend(
cnf_up,
(function()
if vim.v.version < 800 then
if vim.fn.has("nvim-0.9.0") == 0 then
return {
row = row - style.input_win_row_offset,
border = style.borderchars.center,
Expand All @@ -243,7 +243,7 @@ local function swap_win_pos(up, down, style)
vim.fn.extend(
cnf_down,
(function()
if vim.v.version < 800 then
if vim.fn.has("nvim-0.9.0") == 0 then
return {
row = row,
border = style.borderchars.bottom,
Expand Down Expand Up @@ -393,7 +393,7 @@ local function which_setup(
output_obj.win,
vim.fn.extend(wcnf, {
title = (function()
if vim.v.version < 801 then
if vim.fn.has("nvim-0.9.0") == 0 then
return nil
elseif opts.title ~= nil then
return { { " " .. opts.title .. " ", "WFTitleOutputWhich" } }
Expand Down

0 comments on commit 4be8b4c

Please sign in to comment.