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

The symbol is displayed left to cursor in tab indented files #6

Open
drtyrsa opened this issue Mar 19, 2019 · 6 comments
Open

The symbol is displayed left to cursor in tab indented files #6

drtyrsa opened this issue Mar 19, 2019 · 6 comments
Assignees
Labels
🐛 bug Something isn't working 🔍 investigating More information is being gathered

Comments

@drtyrsa
Copy link

drtyrsa commented Mar 19, 2019

I'm editing a file using tabs for indentation (Golang, Makefile any other where code style requires it).

image

So far so good. And then I press enter and get this
image

Notice that the cursor isn't aligned properly, but padded right. It's rather annoying. Expected behavior is like this (here I use spaces, not tabs)
image

Interestingly all the line ending extensions I tried share this problem.

Is it easy to fix? I it is, I could try it myself.

Thanks for your work.

@jeff-hykin jeff-hykin added the 🔍 investigating More information is being gathered label Mar 20, 2019
@jeff-hykin
Copy link
Owner

Hmm I'm not sure what exactly is happening here. (and I'm having a hard time reproducing it) What language are you using?

My current guess is that the language has a auto-indent functionality when you press enter, and somehow the auto indent is messing with the appending of the ending character.

There is probably a rough/hacky but quick way to solve this by re-rendering that line or all of the visible lines. (If you want to try this yourself).

That definitely looks like an annoying/important problem though. I originally created this fork because of a similar issue with the original.

Sadly I probably won't be able to look into this until this summer (~May). I've got a lot of planned changes for this repo around May though.

@jeff-hykin jeff-hykin added the 🐛 bug Something isn't working label Mar 20, 2019
@drtyrsa
Copy link
Author

drtyrsa commented Mar 20, 2019

It is Makefile, and I have a similar problem with Go. And almost fresh installation of VSCode.

@jeff-hykin jeff-hykin self-assigned this Mar 31, 2019
@shungo27
Copy link

same problem. But I found the cause and the solution.

The cause is probably using non-english font. I had a problem using Japanese fonts. Solved by changing editor.fontFamily as follows.

"editor.fontFamily": "English-font, your-font",

my setting:
"editor.fontFamily": "'Iosevka SS05','Ricty Diminished'",
Ricty Diminished is Japanese font

However, I want to fix this problem with code-eol.

@jeff-hykin
Copy link
Owner

jeff-hykin commented Jul 28, 2019

Thanks @shungo27 this should help me reproduce the bug so I can start trying things myself. I agree you shouldn't be expected to change your font for the extension to work. Do you have any other hunches about why this would happen? I don't know much about fonts much less non-English fonts.

Just as a general explanation, the extension finds the newline/eol character(s) and then places a decoration "after" (to the right of) the them. The cursor being positioned after the newline ... should mean its on the next line. I'm starting to wonder if this is a problem with VS Code.

@shungo27
Copy link

I don't know why, but the font seems to make a difference.

"Ricty Diminished" have this problem.
"M+ 1mn" have not this problem.
Both are Japanese fonts.

@jeff-hykin
Copy link
Owner

Thanks, that helps. I guess I'll try to figure out the difference between those fonts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 🔍 investigating More information is being gathered
Projects
None yet
Development

No branches or pull requests

3 participants