20 Commits

Author SHA1 Message Date
HyBer
541bc0d46e fix(window): custom border not work (#157)
use `vim.opt.winborder' as float window border

with `vim.opt.winborder = 'rounded'`

before:
<img width="3780" height="2112" alt="CleanShot 2025-07-22 at 13 48
04@2x"
src="https://github.com/user-attachments/assets/92fceab3-6f8b-4698-a887-1c7d8722a781"
/>

after:
<img width="3768" height="2102" alt="CleanShot 2025-07-22 at 13 47
19@2x"
src="https://github.com/user-attachments/assets/efbc5537-63fe-4a59-aebb-f603ffb1dc00"
/>
2025-07-22 07:15:19 -04:00
Anthony
b4229a094b fix: plenary usage crash (#156)
Fixes bug created in the [commit
ac4a400](ac4a400b25)
**Prevent crash when using plenary.window.float for floating window**

This MR fixes a bug caused by inconsistent return values from
get_window_pos() when vim.g.lazygit_floating_window_use_plenary is
enabled.

**Problem**
When plenary.window.float is used, get_window_pos() returned (win_id,
bufnr) instead of the expected (width, height, row, col). This led to a
runtime error:
E5108: Error executing lua ...window.lua:33: attempt to perform
arithmetic on local 'row' (a nil value)

**Solution**
Ensure that get_window_pos() always returns consistent values and
explicitly handle the Plenary case in open_floating_window().

This prevents arithmetic operations on nil values and restores
compatibility with the Plenary-based layout logic.

**Tested**
- Works correctly with and without
vim.g.lazygit_floating_window_use_plenary set.
- No runtime errors on window resize or open.
- Borders and buffer correctly positioned in both modes.

Co-authored-by: abezlyudniy <abezlyudniy@ozon.ru>
2025-07-21 07:27:19 -04:00
Chen Asraf
ac4a400b25 feat: resize window on nvim resize (#117)
Fixes #116 


https://github.com/kdheepak/lazygit.nvim/assets/167217/729c203a-c873-45c8-8346-cd7266d9eb2f

The `defer` is a bit of a hack, but otherwise the new size doesn't get
enough time to be properly registered. It still sometimes messes up and
positions itself slightly off sometimes if I try to do it several times
fast, so maybe the delay needs to be adjusted, some debounce added, or
we might want to find a different method for ensuring the window has the
correct size.

Co-authored-by: Chen Asraf <chenasraf@users.noreply.github.com>
2025-07-19 10:24:06 -04:00
Carlos Calla Alarcón
4839ab6429 update deprecated vim api usage (#152)
The `vim.loop` prop is deprecated and will be removed at Nvim 1.0. This
PR adds support for the new `vim.uv` prop instead but keeps backward
compatibility with previous versions of Nvim.
2025-06-13 09:54:25 -04:00
Teddy Waweru
b9eae3bada fix: signcolumn overlaps left borders (#132)
signcolumns hide the left borders(for configs that have the signcolumn
opt active. Requires to be set twice(this may be a personal config
scenario). The first sets for the floating window created, the second
for lazygit's UI.
2025-02-17 13:36:36 -05:00
luca-sartore-prorob
77a0d42943 fix: explicitly use cmd on windows to avoid problem using powershell (#145)
If a user is on windows, and is using powershell as the default nvim
shell the command at [line 69 of
utils.lua](https://github.com/lucaSartore/lazygit.nvim/blob/main/lua/lazygit/utils.lua#L67C2-L67C130)
won’t work due to the `&&` operator.
> local cmd = string.format('cd "%s" && git rev-parse --show-toplevel',
fn.fnamemodify(fn.resolve(fn.expand('%:p')), ':h'), root)

I fixed this by forcing the use of cmd.
2024-12-12 08:06:41 -05:00
Ethan Warrick
1e08e3f5ac feat: Use winblend config for plenary window
There is an existing user config for setting the winblend value of the
lazygit floating window. This controls the background transparency of
the window. However, this config option is not respected if the lazygit
window is created using plenary (another user config). This change
forces the plenary window to use the existing config for transparency.
2023-12-15 00:18:17 -05:00
Srivatsan Ramaswamy
de35012036 feat: Add support for multiple lazygit config files
Lazygit supports using multiple config files: https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md?plain=1#L346

This commit adds code to parse vim.g.lazygit_config_file_path as a `string | table`,
then passes the files to `lazygit` via the `-ucf` flag
2023-09-26 00:30:26 -04:00
Roger Kim
75c920883f fix: Cover missing edge case in resetting user's preferred shell 2023-09-05 18:46:07 -04:00
Dheepak Krishnamurthy
18060f9841 Merge pull request #103 from gmerzu/fix2
fix: open_floating_window should return lazygit buffer instead of border_window
2023-09-02 16:01:31 -04:00
Anton Kozhemyachenko
a9382f03c7 fix: open_floating_window should return lazygit buffer instead of border_window 2023-08-03 21:29:54 +03:00
Anton Kozhemyachenko
3d7878cad9 fix: plenary.percentage_range_window returns 'win_id' and 'bufnr' 2023-08-03 18:58:37 +03:00
Dheepak Krishnamurthy
e90f0ee657 feat: Change option to lazygit_floating_window_border_chars 2023-05-20 17:30:30 -04:00
yorik1984
6f5174ff60 Add LazyGit highlighting groups and new border
Add `LazyGitBorder` and `LazyGitFloat` highlighting groups using nvim(>=0.7.2) function  `vim.api.nvim_set_hl`. 
Add full list of window border for useful customize.
2023-01-11 01:17:54 +02:00
aabccd021
3d3ad785d1 fix: Fix broken background color on NVIM v0.8.0 2022-11-05 17:04:52 +07:00
Dheepak Krishnamurthy
c7a8bfb606 Merge pull request #72 from thefux/bug/60-fix-lazygit-telescope-extension
Bug/60 fix lazygit telescope extension
2022-10-25 16:56:55 -04:00
cnrrobertson
bed8d6df13 parametrize get_root to be used in different directories 2022-10-25 16:15:50 -04:00
thefux
061256662c #60 small refactoring: update teardown cleanup process 2022-09-06 15:34:26 +02:00
thefux
da9bafc2f0 clean up and add some ducumentation 2022-03-06 15:05:18 +01:00
thefux
b419f3e8d1 small refactoring 2022-03-06 11:18:41 +01:00