Code Monkey home page Code Monkey logo

Comments (7)

bryphe avatar bryphe commented on August 20, 2024 1

I believe it may be a bug where the reverse option isn't correctly handled in all cases in the (msgpack_rpc)[https://neovim.io/doc/user/msgpack_rpc.html] API.

Are you using a custom colorscheme?

from oni.

Bretley avatar Bretley commented on August 20, 2024 1

This is old and no longer relevant with either solarized or default

from oni.

Bretley avatar Bretley commented on August 20, 2024

I'm using solarized dark truecolor, as you suggested (or maybe it was the vimR guys?) to use for gui. Other than that, I don't have any of my own customisations to the color

from oni.

Bretley avatar Bretley commented on August 20, 2024

The issue went away when I changed to wombat, I'll screw around with some settings and see if I can make it work.

from oni.

Bretley avatar Bretley commented on August 20, 2024

I tried Molokai with no tweaks, airline disabled, and it has issues. I can't actually take a good screenshot on mac because the meta key seems like it isn't handled

from oni.

Bretley avatar Bretley commented on August 20, 2024

Update: In a similar vein (pertaining to the colorschemes) certain errors ( use ! to force ) don't display or are highlighted improperly in the statusline. I think for solarized it might just be that the colors end up hiding the text, as molokai and wombat display them in wrong colors

from oni.

bryphe avatar bryphe commented on August 20, 2024

I was just taking a quick look at this... I believe I can reproduce it reliably like this:

  1. :colorscheme monokai
  2. :color
  3. Press <TAB>
    image

The highlight for the second colorscheme is messed up - the background color is okay (it's yellow as it should be), but the foreground color is white instead of gray.

In Screen.ts there is some code for handling this:

                let foregroundColor = this._currentHighlight.foregroundColor ? this._currentHighlight.foregroundColor : this._foregroundColor
                let backgroundColor = this._currentHighlight.backgroundColor ? this._currentHighlight.backgroundColor : this._backgroundColor

                if (this._currentHighlight.reverse) {
                    const temp = foregroundColor
                    foregroundColor = backgroundColor
                    backgroundColor = temp
                }

But reverse isn't being set to true, and I don't see it being set.

There's also some interesting stuff happening in NeovimInstance.ts where we directly process the message:

            } else if (command === "highlight_set") {

                const count = a.length

                const highlightInfo = a[count - 1][0]

                this.emit("action", Actions.setHighlight(
                    !!highlightInfo.bold,
                    !!highlightInfo.italic,
                    !!highlightInfo.reverse,
                    !!highlightInfo.underline,
                    !!highlightInfo.undercurl,
                    highlightInfo.foreground,
                    highlightInfo.background,
                ))

Particularly the a[count - 1] - there were some cases we were getting multiple highlight calls, and only the last one seemed to be valid. This isn't hitting that case though.

It would be interesting to see how this behaves in other Neovim front-ends - there's a possibility that it is a Neovim bug.

from oni.

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.