edit
edit copied to clipboard
Add support for Terminal.app on macOS
We currently expect full RGB support from the hosting terminal. Terminal.app is likely the only popular terminal that doesn't support it, but it's very popular (relatively speaking), so we should add support for it. This requires downsampling the color here:
https://github.com/microsoft/edit/blob/b008570afc0c4c6cef7ba0335d407139a47c8e24/src/framebuffer.rs#L524-L555
And somehow detecting RGB support here:
https://github.com/microsoft/edit/blob/b008570afc0c4c6cef7ba0335d407139a47c8e24/src/bin/edit/main.rs#L499-L595
Detecting RGB support should not use the COLORTERM environment variable, because a) I don't like it and b) I'm quite certain there's alternatives to do it. The simplest alternative is to just assume that Terminal.app is the only terminal that doesn't support it (...given that this project doesn't aim to support old terminals).