Git Product home page Git Product logo

Comments (3)

fredizzimo avatar fredizzimo commented on June 2, 2024 1

For the second issue, I'm not 100% sure yet, but almost. The preview window consists of two subwindows, the first one has this anchor

TRACE [neovide::channel_utils] neovim_handler WindowFloatPosition { grid: 10, anchor: NorthWest, anchor_grid: 1, anchor_row: -1.0, anchor_column: 40.0, focusable: false, sort_order: Some(39) }

While the second one has this:

TRACE [neovide::channel_utils] neovim_handler WindowFloatPosition { grid: 11, anchor: NorthWest, anchor_grid: 10, anchor_row: 1.0, anchor_column: 1.0, focusable: true, sort_order: Some(40) }

So, the second one is attached to the first one, but the first one is actually anchored outside the screen. Neovim does not reposition floats that are outside the grid, so we are forced to do it ourselves:

But I think our code is a bit too naive and only consider each window individually. Therefore, it only re-positions the outer window with the borders, leaving the inner one in place, which means that they start to overlap. I think we just need to consider all the attached floating windows as a whole group and reposition it as a whole.

from neovide.

fredizzimo avatar fredizzimo commented on June 2, 2024

I'm commenting on the first issue first, and will investigate the second one next.
The windows have z-index 99 and 100 respectively, and with:

There are basically two options, I think.

  1. Standardize that consecutive z-indices are special around the whole nvim echo system. The issue can be fixed by using z-index 100 and 102 for example.
  2. Properly experiment, if we actually need to combine different layers, or if it's enough to use a single layer while still maintaining compatibility with the terminal mode rendering. This probably also requires some adaptation on the plugin side, but if it works, I think it's a much nicer option than number 1.

@Kethku

from neovide.

sid-6581 avatar sid-6581 commented on June 2, 2024

@fredizzimo after looking at it some more, I think the second issue may be a nui bug. neo-tree is requesting a popup with row 0, and then nui adjusts it to -1 here:

https://github.com/MunifTanjim/nui.nvim/blob/cbd2668414331c10039278f558630ed19b93e69b/lua/nui/popup/border.lua#L342-L347

I'm honestly not sure if this is something neovim should do something about when multigrid is enabled? It does appear to clamp the values in the terminal, so it is technically inconsistent, but I'm not sure if the way neovim/neovide handles it now is really wrong.

from neovide.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.