Skip to content

Commit 345c2f0

Browse files
Use small floating window for modifications instead of a split.
1 parent ae34000 commit 345c2f0

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

lua/orgmode/parser/files.lua

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,14 +185,21 @@ function Files.update_file(filename, action)
185185
vim.cmd(':silent! w')
186186
return true
187187
end
188-
local old_height = vim.api.nvim_win_get_height(0)
189-
vim.cmd('silent! topleft split ' .. filename)
188+
local bufnr = vim.fn.bufadd(filename)
189+
vim.api.nvim_open_win(bufnr, true, {
190+
relative = 'editor',
191+
width = 1,
192+
height = 1,
193+
row = 99999,
194+
col = 99999,
195+
zindex = 1,
196+
style = 'minimal',
197+
})
190198
if action then
191199
action(file)
192200
end
193201
vim.cmd('silent! wq!')
194202
vim.api.nvim_set_current_win(cur_win)
195-
vim.cmd(string.format('silent! resize %d', old_height))
196203
return true
197204
end
198205

0 commit comments

Comments
 (0)