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

Update fterm.lua #1

Open
wants to merge 1 commit into
base: master
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
10 changes: 5 additions & 5 deletions lua/fterm.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ local function open_window()
create_buf()
end

local editor_width = vim.api.nvim_get_option("columns")
local editor_height = vim.api.nvim_get_option("lines")
local editor_width = vim.opt.columns:get()
local editor_height = vim.opt.lines:get()

local position = get_option("position")
local row
local col
local width
local height
local cmdheight = vim.api.nvim_get_option("cmdheight")
local cmdheight = vim.opt.cmdheight.get()

if position == "top" then
row = 0
Expand All @@ -77,7 +77,7 @@ local function open_window()
local buf = vim.g[FTERM_BUF]
print(row, col, width, height)
win = vim.api.nvim_open_win(buf, true, {
relative='win', anchor='NW', row=row, col=col, width=width, height=height, style="minimal"
relative='win', anchor='NW', row=row, col=col, width=width, height=height, style="minimal", border="single"
})

local buf_name = vim.api.nvim_buf_get_name(buf)
Expand All @@ -104,7 +104,7 @@ local function exec(cmd)
end

local buf = vim.g[FTERM_BUF]
local channel = vim.api.nvim_buf_get_option(buf, "channel")
local channel = vim.api.nvim_buf_get_var(buf, "channel")
vim.call("chansend", channel, string.format("%s\n", cmd))
end

Expand Down