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

[Phantoms] Layout Above request #4469

Open
TerminalFi opened this issue Jun 16, 2021 · 5 comments
Open

[Phantoms] Layout Above request #4469

TerminalFi opened this issue Jun 16, 2021 · 5 comments

Comments

@TerminalFi
Copy link

TerminalFi commented Jun 16, 2021

Problem description

Currently Sublime implementation of Phantoms support various layout formats. sublime.LAYOUT_INLINE sublime.LAYOUT_BELOW sublime.LAYOUT_BLOCK

There should be however a sublime.LAYOUT_ABOVE option as well. Currently this can be achieved by getting the current line and subtracting 1 to get the previous line. And inserting the phantom that way.

Preferred solution

Add a sublime.LAYOUT_ABOVE position flag

Alternatives

No suitable alternatives

@BenjaminSchaaf
Copy link
Member

Preferred solution
Add a sublime.LAYOUT_BELOW position flag

I assume you mean sublime.LAYOUT_ABOVE here?

@TerminalFi
Copy link
Author

TerminalFi commented Jun 16, 2021

Heh, yup thanks for that! Fixed

@rwols
Copy link

rwols commented Jun 26, 2021

Currently this can be achieved by getting the current line and subtracting 1 to get the previous line. And inserting the phantom that way.

No, that makes the phantom behave oddly in case the buffer is modified in that region.

@keith-hall
Copy link
Collaborator

and it doesn't help for the use case of a phantom above the first line ;)

@TerminalFi
Copy link
Author

Currently this can be achieved by getting the current line and subtracting 1 to get the previous line. And inserting the phantom that way.

No, that makes the phantom behave oddly in case the buffer is modified in that region.

This is true, I guess there is no proper alternative at the moment

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

No branches or pull requests

5 participants