Skip to content

Commit 07fd8cc

Browse files
committed
fix(nvim): set cterm colors
using the colors described here rather than the color map https://neovim.io/doc/user/syntax.html#ctermbg
1 parent d19c212 commit 07fd8cc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

nvim/api_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3570,8 +3570,8 @@ func testHighlight(v *Nvim) func(*testing.T) {
35703570
const testHLName = `Test`
35713571
testHLAttrs := &HLAttrs{
35723572
Bold: true,
3573-
CtermForeground: cm[`Red`],
3574-
CtermBackground: cm[`Yellow`],
3573+
CtermForeground: 12,
3574+
CtermBackground: 14,
35753575
}
35763576
if err := v.SetHighlight(nsID, testHLName, testHLAttrs); err != nil {
35773577
t.Fatal(err)
@@ -3647,8 +3647,8 @@ func testHighlight(v *Nvim) func(*testing.T) {
36473647
const testHLName = `Test`
36483648
testHLAttrs := &HLAttrs{
36493649
Bold: true,
3650-
CtermForeground: cm[`Red`],
3651-
CtermBackground: cm[`Yellow`],
3650+
CtermForeground: 12,
3651+
CtermBackground: 14,
36523652
}
36533653
b.SetHighlight(nsID, testHLName, testHLAttrs)
36543654
if err := b.Execute(); err != nil {

nvim/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ type HLAttrs struct {
152152

153153
// Cterm is cterm attribute map. Sets attributed for cterm colors.
154154
//
155-
// Note thet by default cterm attributes are same as attributes of gui color.
155+
// Note that by default cterm attributes are same as attributes of gui color.
156156
//
157157
// This value is used only SetHighlight.
158158
Cterm *HLAttrs `msgpack:"cterm,omitempty"`

0 commit comments

Comments
 (0)