kevinsawicki / monokai

Monokai Atom Syntax theme
241 stars 133 forks source link

Invisibles at end of line not showing, cursor not moving #111

Closed mquevill closed 3 years ago

mquevill commented 3 years ago

I think this came up during an update to Atom, but I'm not sure if it's an issue with the Monokai theme or the language-c package, since it doesn't happen with every language. I'm thinking it might actually be related to braces ("{}"), since that seems to be when things get messed up.

My issue is that any invisible characters that I have set do not show at the end of the line. For instance, if I am typing on a line, it will not show me any spaces until I press a non-space character. In addition, it will not move my cursor! (See images below for demonstration.) I only have spaces and tabs shown for invisibles, but this happens with both of them.

Atom v1.56.0 Linux Mint 20.1

In a sample C++ file (not proper code):

Typed "Test case " (4 spaces at end) with Monokai image Typed "Test case 1" (4 spaces) with Monokai [only typed "1" from previous] image Typed "Test case " (4 spaces at end) with Atom-Dark image Typed "Test case 1" (4 spaces) with Atom-Dark [only typed "1" from previous] image

jonyyz commented 3 years ago

Invisibles don't show at all on Atom 1.56 on Windows 10

Using Atom Dark: image

Using Monokai: image

aaronclinger commented 3 years ago

Trailing spaces also not working on macOS Big Sur and in a number of language packages (PHP, CSS, JavaScript, etc.)

I do believe it is an issue in combination with Atom v1.56.0. I rolled back to 1.55 and it seemed to work fine.

jonyyz commented 3 years ago

The issue is here in index.less:

image

Remove that and the invisibles will show up again. If you look at the theme template that ships with 1.56 compared to the theme template on github you'll notice there are some differences. Apparently, that hack fix is no longer necessary?

Tiross commented 3 years ago

The issue is here in index.less:

image

Remove that and the invisibles will show up again.

Or add

.leading-whitespace,
.trailing-whitespace {
  display: inline;
}

into ~/.atom/styles.less

gustavoalfaro commented 3 years ago

Fixed in #112