xi-editor / xi-mac

The xi-editor mac frontend.
Apache License 2.0
3.02k stars 147 forks source link

Issue #357 - Default Gutter Color to Theme's Background Color #401

Closed rlziii closed 5 years ago

rlziii commented 5 years ago

Summary

If a theme does not specify a gutter color, use the theme's background color as the gutter color. This is changed from previously (which used the default gutter color). If the theme also does not specify a background color, then simply fallback to the default gutter color as before. This seems to give a better visual representation for themes overall that may not specify the gutter color.

Related Issues

Related to #357

closes #357

Details

When chaining Swift's nil-coalescing operator (??) it isn't strictly necessary to enclose the second statement in parenthesis. However, I have done so for clarity. For example, the following two examples will always produce the same result, though I feel like the first example is more clear in its intent.

var something = something1 ?? (something2 ?? something3) var something = something1 ?? something2 ?? something3

Review Checklist

cmyr commented 5 years ago

Thanks!