martanne / vis

A vi-like editor based on Plan 9's structural regular expressions
Other
4.27k stars 261 forks source link

color-column: Don't change fg/bg if not set explicitly #819

Closed sh4r1k7 closed 4 years ago

sh4r1k7 commented 4 years ago

eg. if your long line is a comment with green fg, and you set your column color bg red while not specifying the fg, then the result is green fg on red bg.

Prior to this change the result would be default fg on red bg, thus one char in the long line of green text would look odd/wrong.

Of course if you do explicitly set the column color fg to default in your theme then the result will not be what you expect - ideally we need an UNSPECIFIED color type instead of relying on DEFAULT.

The #if CONFIG_CURSORS block is not ideal but I'm not sure what would be the right place to put it as currently all those defines are in other source files - is there a reason they're not in a header file?

sh4r1k7 commented 4 years ago

Found a neater solution. Tested it with and without curses.