Skip to content

Commit f256dbb

Browse files
committed
🐛 Fix invalid names
1 parent 6464d91 commit f256dbb

File tree

8 files changed

+28
-28
lines changed

8 files changed

+28
-28
lines changed

denops/fall/component/input.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import { Spinner } from "../lib/spinner.ts";
66
import { adjustOffset } from "../lib/adjust_offset.ts";
77
import { BaseComponent, type ComponentParams } from "./_component.ts";
88

9-
export const HIGHLIGHT_HEADER = "FillInputHeader";
10-
export const HIGHLIGHT_CURSOR = "FillInputCursor";
11-
export const HIGHLIGHT_COUNTER = "FillInputCounter";
9+
export const HIGHLIGHT_HEADER = "FallInputHeader";
10+
export const HIGHLIGHT_CURSOR = "FallInputCursor";
11+
export const HIGHLIGHT_COUNTER = "FallInputCounter";
1212

1313
export type InputComponentParams = ComponentParams & {
1414
title?: string;

denops/fall/component/list.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import type { Dimension } from "../../@fall/layout.ts";
88
import type { DisplayItem } from "../../@fall/item.ts";
99
import { BaseComponent } from "./_component.ts";
1010

11-
export const HIGHLIGHT_MATCH = "FillListMatch";
12-
export const SIGN_GROUP_SELECTED = "PopUpFillListSelected";
13-
export const SIGN_SELECTED = "FillListSelected";
11+
export const HIGHLIGHT_MATCH = "FallListMatch";
12+
export const SIGN_GROUP_SELECTED = "PopUpFallListSelected";
13+
export const SIGN_SELECTED = "FallListSelected";
1414

1515
export class ListComponent extends BaseComponent {
1616
#scroll = 1;

denops/fall/picker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export class Picker<T> implements AsyncDisposable {
129129
stack.use(await this.#inputComponent.open(denops, { signal }));
130130
stack.use(await this.#listComponent.open(denops, { signal }));
131131
stack.use(await this.#previewComponent?.open(denops, { signal }));
132-
// Emit 'FillPickerEnter/FillPickerLeave' autocmd
132+
// Emit 'FallPickerEnter/FallPickerLeave' autocmd
133133
stack.defer(async () => {
134134
await emitPickerLeave(denops, this.#name);
135135
});

denops/fall/util/emitter.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { Denops } from "jsr:@denops/std@^7.3.0";
22
import { emit } from "jsr:@denops/std@^7.3.0/autocmd";
33

44
/**
5-
* Save current cmap and emit `User FillPickerEnter:{name}` autocmd.
5+
* Save current cmap and emit `User FallPickerEnter:{name}` autocmd.
66
*
77
* The saved cmap will be restored by `emitPickerLeave`.
88
*/
@@ -11,21 +11,21 @@ export async function emitPickerEnter(
1111
name: string,
1212
): Promise<void> {
1313
try {
14-
await emit(denops, "User", `FillPickerEnter:${name}`, { nomodeline: true });
14+
await emit(denops, "User", `FallPickerEnter:${name}`, { nomodeline: true });
1515
} catch (err) {
1616
console.warn(`[fall] Failed to emit FallPickerEnter:${name}`, err);
1717
}
1818
}
1919

2020
/**
21-
* Restore saved cmap and emit `User FillPickerLeave:{name}` autocmd.
21+
* Restore saved cmap and emit `User FallPickerLeave:{name}` autocmd.
2222
*/
2323
export async function emitPickerLeave(
2424
denops: Denops,
2525
name: string,
2626
): Promise<void> {
2727
try {
28-
await emit(denops, "User", `FillPickerLeave:${name}`, { nomodeline: true });
28+
await emit(denops, "User", `FallPickerLeave:${name}`, { nomodeline: true });
2929
} catch (err) {
3030
console.warn(`[fall] Failed to emit FallPickerLeave:${name}`, err);
3131
}

denops/fall/util/emitter_test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { DenopsStub } from "jsr:@denops/test@^3.0.4/stub";
44
import { emitPickerEnter, emitPickerLeave } from "./emitter.ts";
55

66
Deno.test("emitPickerEnter", async (t) => {
7-
await t.step("emit 'User FillPickerEnter:{name}'", async () => {
7+
await t.step("emit 'User FallPickerEnter:{name}'", async () => {
88
const called: [string, Record<PropertyKey, unknown>][] = [];
99
const denops = new DenopsStub({
1010
cmd(name, ctx): Promise<void> {
@@ -14,13 +14,13 @@ Deno.test("emitPickerEnter", async (t) => {
1414
});
1515
await emitPickerEnter(denops, "test");
1616
assertEquals(called, [
17-
["do <nomodeline> User FillPickerEnter:test", {}],
17+
["do <nomodeline> User FallPickerEnter:test", {}],
1818
]);
1919
});
2020
});
2121

2222
Deno.test("emitPickerLeave", async (t) => {
23-
await t.step("emit 'User FillPickerLeave:{name}'", async () => {
23+
await t.step("emit 'User FallPickerLeave:{name}'", async () => {
2424
const called: [string, Record<PropertyKey, unknown>][] = [];
2525
const denops = new DenopsStub({
2626
cmd(name, ctx): Promise<void> {
@@ -30,7 +30,7 @@ Deno.test("emitPickerLeave", async (t) => {
3030
});
3131
await emitPickerLeave(denops, "test");
3232
assertEquals(called, [
33-
["do <nomodeline> User FillPickerLeave:test", {}],
33+
["do <nomodeline> User FallPickerLeave:test", {}],
3434
]);
3535
});
3636
});

plugin/fall.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ command! -nargs=0 FallConfig call fall#command#FallConfig#call()
88

99
augroup fall_plugin
1010
autocmd! *
11-
autocmd User FillPickerEnter:* :
12-
autocmd User FillPickerLeave:* :
11+
autocmd User FallPickerEnter:* :
12+
autocmd User FallPickerLeave:* :
1313
autocmd VimResized * call fall#internal#dispatch(#{type: 'vim-resized', width: &columns, height: &lines})
1414
augroup END
1515

plugin/fall/highlight.vim

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@ let g:loaded_fall_highlight = 1
55

66
function! s:init() abort
77
if has('nvim')
8-
highlight default link FillNormal FloatNormal
9-
highlight default link FillBorder FloatBorder
8+
highlight default link FallNormal FloatNormal
9+
highlight default link FallBorder FloatBorder
1010
else
11-
highlight default link FillNormal Normal
12-
highlight default link FillBorder EndOfBuffer
11+
highlight default link FallNormal Normal
12+
highlight default link FallBorder EndOfBuffer
1313
endif
1414

1515
" Input
16-
highlight default link FillInputHeader FillBorder
17-
highlight default link FillInputCounter FillBorder
18-
highlight default link FillInputCursor Cursor
16+
highlight default link FallInputHeader FallBorder
17+
highlight default link FallInputCounter FallBorder
18+
highlight default link FallInputCursor Cursor
1919

2020
" List
21-
highlight default link FillListMatch Search
22-
highlight default link FillListSelected CurSearch
23-
sign define FillListSelected text=
21+
highlight default link FallListMatch Search
22+
highlight default link FallListSelected CurSearch
23+
sign define FallListSelected text=
2424
endfunction
2525

2626
augroup fall_plugin_highlight

plugin/fall/mapping.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,6 @@ if !get(g:, 'fall_disable_default_mapping')
6767

6868
augroup fall_mapping_plugin
6969
autocmd!
70-
autocmd User FillPickerEnter:* call s:map_picker()
70+
autocmd User FallPickerEnter:* call s:map_picker()
7171
augroup END
7272
endif

0 commit comments

Comments
 (0)