Git Product home page Git Product logo

Comments (5)

rhysd avatar rhysd commented on June 9, 2024

Float window size should be shrunk to fit to its contents as screenshot in README file. Window size is calculated here:

https://github.com/rhysd/git-messenger.vim/blob/master/autoload/gitmessenger/popup.vim#L59

However, as you showed in screenshot, the calculation seems not correct in some case. Would you tell me more information to reproduce this. Then I would be able to analyze what is happening.

from git-messenger.vim.

megalithic avatar megalithic commented on June 9, 2024

@rhysd thank you, i went and added some echo's for the height and width reported by that function you referenced above. i'm getting a computed width of 50 and a height of 8. That DEFINITELY doesn't look right. I don't know how to tell you to recreate. Other than pulling down my config found here: https://github.com/megalithic/dotfiles/blob/master/nvim/init.vim

from git-messenger.vim.

rhysd avatar rhysd commented on June 9, 2024

Thank you for confirming that. I'm trying your repository. However, on my local environment, the window size is correct:

スクリーンショット 2019-09-11 9 54 51

There would be some hidden condition. Would you check the opts variable here?

let opts = self.floating_win_opts(width, height)

It is an option dictionary passed to nvim_open_win(). I want to confirm options are correct or not. If the value is correct, perhaps it may be a bug of Neovim or some effects from other plugins. Rebuilding the latest nightly Neovim may solve this issue in the case.

from git-messenger.vim.

megalithic avatar megalithic commented on June 9, 2024

@rhysd thanks again for helping with this.. please find the attached screenshot (see the echo'd sizings from the line number you mentioned for the opts dict)

Screenshot 2019-09-12 09 09 00

from git-messenger.vim.

rhysd avatar rhysd commented on June 9, 2024

Thank you for trying that.

Let me confirm one thing. The output in your screenshot is

OPTS: width54, height: 11, row: 1, col: 0

Does it mean that the opts dict was { width: 54, height: 11, row: 1, col: 0}? If you're ok, adding following line and dumping entire dictionary would be more helpful:

echom string(opts)

Anyway, it seems that a dictionary passed to nvim_open_win() has correct size information. I'm still not understanding why your float window does not follow the size. Possible reasons would be

  1. Some autocmd hook changes size of window (some other plugin may hook WinEnter or BufEnter or some events)
  2. Neovim's bug

Would you also tell me your OS and Neovim's version (especially the git revision of your Neovim build)? Then I would be able to align environment with you. If possible, temporarily removing other plugins and load only git-messenger.vim in your environment is helpful to ensure that other plugin does not affect.

from git-messenger.vim.

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.