diff options
author | Zhizhen He <hezhizhen.yi@gmail.com> | 2023-02-22 23:36:04 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-23 00:36:04 +0900 |
commit | 3364d4d147ade148d8e5dd67609e46f0ef6c50fc (patch) | |
tree | 976d70d7d218cb1c29143201390db4c8d19b1715 | |
parent | 57ad21e4bd2d9c59cdfe0522183ac12c30ee2f05 (diff) |
Add spell check workflow (#3183)
-rw-r--r-- | .github/workflows/typos.yml | 10 | ||||
-rw-r--r-- | man/man1/fzf.1 | 2 | ||||
-rw-r--r-- | src/terminal.go | 2 | ||||
-rw-r--r-- | src/util/util_test.go | 4 | ||||
-rw-r--r-- | typos.toml | 6 |
5 files changed, 20 insertions, 4 deletions
diff --git a/.github/workflows/typos.yml b/.github/workflows/typos.yml new file mode 100644 index 00000000..02cb5aec --- /dev/null +++ b/.github/workflows/typos.yml @@ -0,0 +1,10 @@ +name: "Spell Check" +on: [pull_request] + +jobs: + typos: + name: Spell Check with Typos + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: crate-ci/typos@v1.13.10 diff --git a/man/man1/fzf.1 b/man/man1/fzf.1 index f2dbcfe7..6d6d49bd 100644 --- a/man/man1/fzf.1 +++ b/man/man1/fzf.1 @@ -1145,7 +1145,7 @@ set, otherwise with \fBsh -c\fR, so in this case make sure that the command is POSIX-compliant. \fBbecome(...)\fR action is similar to \fBexecute(...)\fR, but it replaces the -current fzf process with the specifed command using \fBexecve(2)\fR system +current fzf process with the specified command using \fBexecve(2)\fR system call. \fBfzf --bind "enter:become(vim {})"\fR diff --git a/src/terminal.go b/src/terminal.go index ebb48887..21400378 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -3288,7 +3288,7 @@ func (t *Terminal) Loop() { break } - // Prevew scrollbar dragging + // Preview scrollbar dragging headerLines := t.previewOpts.headerLines pbarDragging = me.Down && (pbarDragging || clicked && t.hasPreviewWindow() && my >= t.pwindow.Top()+headerLines && my < t.pwindow.Top()+t.pwindow.Height() && mx == t.pwindow.Left()+t.pwindow.Width()) if pbarDragging { diff --git a/src/util/util_test.go b/src/util/util_test.go index 534eeb71..27e7a049 100644 --- a/src/util/util_test.go +++ b/src/util/util_test.go @@ -70,7 +70,7 @@ func TestMin32(t *testing.T) { } } -func TestContrain(t *testing.T) { +func TestConstrain(t *testing.T) { if Constrain(-3, -1, 3) != -1 { t.Error("Expected", -1) } @@ -83,7 +83,7 @@ func TestContrain(t *testing.T) { } } -func TestContrain32(t *testing.T) { +func TestConstrain32(t *testing.T) { if Constrain32(-3, -1, 3) != -1 { t.Error("Expected", -1) } diff --git a/typos.toml b/typos.toml new file mode 100644 index 00000000..19f64adb --- /dev/null +++ b/typos.toml @@ -0,0 +1,6 @@ +# See https://github.com/crate-ci/typos/blob/master/docs/reference.md to configure typos +[default.extend-words] +ba = "ba" +fo = "fo" +enew = "enew" +tabe = "tabe" |