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

fix(float): make screen*() functions respect floating windows #19020

Merged
merged 1 commit into from
Jun 23, 2022

Conversation

echasnovski
Copy link
Member

This is an attempt to fix #19013. I hope it fixes the problem of ignoring floating windows while not breaking other tests. Tested this fix on custom get_screenshot() (basically calling screenstring() and screenattr() on all cells from 1..vim.o.lines x 1.vim.o.columns) with several overlapping floating windows. Seems to work.

Disclaimer: I don't know much about Neovim C codebase (and C in general). I mostly copied and modified ui_comp_mouse_focus() which seems to properly handle floating windows for mouse functionality. This might be suboptimal, but works for cases I tested.

@github-actions github-actions bot added the float floating windows label Jun 19, 2022
@echasnovski
Copy link
Member Author

Pushed commit that addresses oldtest. Didn't realize that make test doesn't test for "old tests".

src/nvim/eval.c Outdated Show resolved Hide resolved
src/nvim/eval/funcs.c Outdated Show resolved Hide resolved
src/nvim/eval.c Outdated Show resolved Hide resolved
src/nvim/eval/funcs.c Outdated Show resolved Hide resolved
@echasnovski
Copy link
Member Author

Just to be sure, is there anything else I can/should do to get this merged?

@bfredl
Copy link
Member

bfredl commented Jun 23, 2022

@echasnovski looks alright, squash?

@echasnovski
Copy link
Member Author

@echasnovski looks alright, squash?

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
float floating windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

screen*() functions don't register floating windows
3 participants