Skip to content

split win.lua into modules#2512

Merged
ibhagwan merged 20 commits intoibhagwan:mainfrom
phanen:split-win
Feb 23, 2026
Merged

split win.lua into modules#2512
ibhagwan merged 20 commits intoibhagwan:mainfrom
phanen:split-win

Conversation

@phanen
Copy link
Copy Markdown
Collaborator

@phanen phanen commented Jan 13, 2026

  • refactor: split scrollbar/helpwin/backdrop/tsinjector from win.lua
  • chore: lint

@phanen phanen force-pushed the split-win branch 7 times, most recently from f34c822 to aeb9e7e Compare January 18, 2026 03:34
@phanen
Copy link
Copy Markdown
Collaborator Author

phanen commented Jan 18, 2026

Maybe we can generate screenshots on a fixed revision, to reduce screenshot rotten

@ibhagwan
Copy link
Copy Markdown
Owner

Maybe we can generate screenshots on a fixed revision, to reduce screenshot rotten

You mean when we add new files?

We can have a test folder with a few files and run all testing only inside the test folder - is this what you mean by fixed rev?

@phanen
Copy link
Copy Markdown
Collaborator Author

phanen commented Jan 18, 2026

We can have a test folder with a few files and run all testing only inside the test folder - is this what you mean by fixed rev?

yes, that's also an option.

@ibhagwan
Copy link
Copy Markdown
Owner

We can have a test folder with a few files and run all testing only inside the test folder - is this what you mean by fixed rev?

yes, that's also an option.

I like the revision idea, reduces junk test files, slight issue is debugging the screenshots (if something is missing) is slightly more annoying.

@phanen phanen force-pushed the split-win branch 2 times, most recently from e45b1d9 to d836dd7 Compare January 18, 2026 04:41
@phanen
Copy link
Copy Markdown
Collaborator Author

phanen commented Jan 18, 2026

now child run in ./deps/fzf-lua, test runner in ./.

Not sure why some grep/file screenshots changed

@phanen
Copy link
Copy Markdown
Collaborator Author

phanen commented Jan 18, 2026

Confusing windows screenshot. so previous window use find, but now it use dir

@phanen phanen force-pushed the split-win branch 12 times, most recently from 3281da7 to 04a213b Compare January 19, 2026 08:34
@phanen
Copy link
Copy Markdown
Collaborator Author

phanen commented Jan 19, 2026

Why this step is needed when we hide fzf win?

fzf-lua/lua/fzf-lua/win.lua

Lines 1049 to 1053 in 04a213b

function FzfWin:detach_fzf_buf()
self._hidden_fzf_bufnr = self.fzf_bufnr
vim.bo[self._hidden_fzf_bufnr].bufhidden = ""
self:set_tmp_buffer(true)
end

Or why _hidden_fzf_bufnr is needed? I guess this is to avoid side effects of &hidden/&bufhidden options?

@ibhagwan
Copy link
Copy Markdown
Owner

Btw, do you know why in 740b07e the preview screenshots have one less character? is it due to the preview scrollbar?

@phanen
Copy link
Copy Markdown
Collaborator Author

phanen commented Feb 23, 2026

is it due to the preview scrollbar?

not sure, I hope so..

@ibhagwan
Copy link
Copy Markdown
Owner

is it due to the preview scrollbar?

not sure, I hope so..

I don’t mind it, just want to understand if this is intentional and why it happens, the ci scroll bar didn’t change AFAIK so why would this happen

Test runner cwd unchanged, child init cwd is ./deps/fzf-lua
Remember to wrap abspath when use some path in child
@ibhagwan
Copy link
Copy Markdown
Owner

485ee67, lucky guess, it seems that it was the scroll bar, maybe it’s enabled differently due to the refactor?

win.lua is a bit big now

fix(tsinjector): detach after clear_cache
* remove "save/restore" hacks, use utils.win_set_config to
  remove style="minimal"

* nvim_win_set_config title require without border
  only fail when <0.11
fix: correct win types

fix(win): winrestcmd is only used for split
remove useless functions

chore: setup autocmds together

chore: consistent code style
the release order is a bit non-deterministic
but should not be a big issue
array part always emit, non-array part only emit on given events
@phanen
Copy link
Copy Markdown
Collaborator Author

phanen commented Feb 23, 2026

Yes, it's scrollbar. It shouldn't in that commit. I forgot to split this out when reorder the commit. But now it's fixed in b88d338.

@ibhagwan
Copy link
Copy Markdown
Owner

Yes, it's scrollbar. It shouldn't in that commit. I forgot to split this out when reorder the commit. But now it's fixed in b88d338.

Can i merge then

@phanen
Copy link
Copy Markdown
Collaborator Author

phanen commented Feb 23, 2026

yes

@ibhagwan ibhagwan merged commit 5e5cbc9 into ibhagwan:main Feb 23, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants