Skip to content

Commit 27f9822

Browse files
committed
fixes #45
1 parent 0092cac commit 27f9822

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

node/sidebar.ts

-4
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ export class Sidebar {
9393
split: sidebarPosition,
9494
width: WIDTH,
9595
height: displayHeight,
96-
style: "minimal",
9796
},
9897
])) as WindowId;
9998
const displayWindow = new NvimWindow(displayWindowId, this.nvim);
@@ -118,7 +117,6 @@ export class Sidebar {
118117
split: "below",
119118
width: WIDTH,
120119
height: inputHeight,
121-
style: "minimal",
122120
},
123121
])) as WindowId;
124122

@@ -134,8 +132,6 @@ export class Sidebar {
134132
const winOptions = {
135133
wrap: true,
136134
linebreak: true,
137-
number: false,
138-
relativenumber: false,
139135
cursorline: true,
140136
};
141137

node/tools/diff.spec.ts

+13
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ import type { Line } from "../nvim/buffer";
77
describe("node/tools/diff.spec.ts", () => {
88
it("insert into new file", async () => {
99
await withDriver(async (driver) => {
10+
await driver.nvim.call("nvim_set_option_value", [
11+
"relativenumber",
12+
true,
13+
{},
14+
]);
15+
1016
await driver.showSidebar();
1117
await driver.inputMagentaText(
1218
`Write me a short poem in the file poem.txt`,
@@ -47,6 +53,7 @@ describe("node/tools/diff.spec.ts", () => {
4753
});
4854

4955
expect(await poemWin.getOption("diff")).toBe(true);
56+
expect(await poemWin.getOption("relativenumber")).toBe(true);
5057

5158
const poemText = (
5259
await (await poemWin.buffer()).getLines({ start: 0, end: -1 })
@@ -118,6 +125,11 @@ describe("node/tools/diff.spec.ts", () => {
118125

119126
it("replace in existing file", async () => {
120127
await withDriver(async (driver) => {
128+
await driver.nvim.call("nvim_set_option_value", [
129+
"relativenumber",
130+
true,
131+
{},
132+
]);
121133
await driver.showSidebar();
122134
await driver.inputMagentaText(
123135
`Update the poem in the file node/test/fixtures/poem.txt`,
@@ -164,6 +176,7 @@ Paints its colors in the light.`,
164176
});
165177

166178
expect(await poemWin.getOption("diff")).toBe(true);
179+
expect(await poemWin.getOption("relativenumber")).toBe(true);
167180

168181
const poemText = (
169182
await (await poemWin.buffer()).getLines({ start: 0, end: -1 })

node/tools/diff.ts

-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ export async function displayDiffs({
6161
win: -1, // global split
6262
split: "right",
6363
width: WIDTH,
64-
style: "minimal",
6564
},
6665
])) as WindowId;
6766

@@ -130,7 +129,6 @@ export async function displayDiffs({
130129
win: fileWindowId, // global split
131130
split: "left",
132131
width: WIDTH,
133-
style: "minimal",
134132
},
135133
]);
136134

0 commit comments

Comments
 (0)