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 tab indent for popup #94

Merged
merged 1 commit into from
May 8, 2020
Merged

Fix tab indent for popup #94

merged 1 commit into from
May 8, 2020

Conversation

cocopon
Copy link
Contributor

@cocopon cocopon commented Apr 12, 2020

Thank you for the great plugin! I'm using your plugin with Vim 8.2 and its popup feature:

let g:matchup_matchparen_offscreen = {
  \   'method': 'popup',
  \ }

My environment:

  • macOS 10.15.2
  • Vim 8.2 (patch 1-319)

I prefer tab indent and sometimes popup window renders it as different width like this:

master

HTML file for reproducing the behavior (please try it with the option :set tabstop=2):
https://gist.github.com/cocopon/3de4fe7e43a5713ac473ae18688a10fd

I think Vim popup window maybe doesn't follow tabstop option of the current buffer. This pull request will fix the problem by replacing tab characters with spaces.

fixed

Neovim floating window works fine so I fixed only the code for Vim popup window.

@andymass andymass merged commit 6836995 into andymass:master May 8, 2020
@andymass
Copy link
Owner

andymass commented May 8, 2020

Thanks for the contribution! (and sorry for the delay, thought I merged this already..)

I think we should make the popup a view of the current buffer (like in the nvim implementation) instead of pure text, then there would be no need to worry about line numbers and tabs.

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