From 8b664899876d5c1863a8c209905f312eeb75561f Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sun, 19 Apr 2026 19:19:43 +0900 Subject: [PATCH] Clean up non-ascii characters --- ADVANCED.md | 14 +++++++------- README.md | 12 ++++++------ src/algo/SIMD.md | 10 +++++----- src/algo/indexbyte2_arm64.s | 2 +- src/ansi.go | 2 +- src/terminal_test.go | 4 ++-- src/tui/tui_test.go | 2 +- test/test_core.rb | 18 +++++++++--------- test/test_server.rb | 2 +- 9 files changed, 33 insertions(+), 33 deletions(-) diff --git a/ADVANCED.md b/ADVANCED.md index c97d96fd..b43ca102 100644 --- a/ADVANCED.md +++ b/ADVANCED.md @@ -309,16 +309,16 @@ I know it's a lot to digest, let's try to break down the code. available color options. - The value of `--preview-window` option consists of 5 components delimited by `,` - 1. `up` — Position of the preview window - 1. `60%` — Size of the preview window - 1. `border-bottom` — Preview window border only on the bottom side - 1. `+{2}+3/3` — Scroll offset of the preview contents - 1. `~3` — Fixed header + 1. `up` -- Position of the preview window + 1. `60%` -- Size of the preview window + 1. `border-bottom` -- Preview window border only on the bottom side + 1. `+{2}+3/3` -- Scroll offset of the preview contents + 1. `~3` -- Fixed header - Let's break down the latter two. We want to display the bat output in the preview window with a certain scroll offset so that the matching line is positioned near the center of the preview window. - - `+{2}` — The base offset is extracted from the second token - - `+3` — We add 3 lines to the base offset to compensate for the header + - `+{2}` -- The base offset is extracted from the second token + - `+3` -- We add 3 lines to the base offset to compensate for the header part of `bat` output - ``` ───────┬────────────────────────────────────────────────────────── diff --git a/README.md b/README.md index fdd6c5ef..01220a81 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ fzf merch

- Show your love for fzf — T-shirts, mugs, and stickers now available! + Show your love for fzf -- T-shirts, mugs, and stickers now available!

commitgoods.com/collections/fzf @@ -37,10 +37,10 @@ characters and still get the results you want. Highlights ---------- -- **Portable** — Distributed as a single binary for easy installation -- **Fast** — Optimized to process millions of items instantly -- **Versatile** — Fully customizable through an event-action binding mechanism -- **All-inclusive** — Comes with integrations for Bash, Zsh, Fish, Vim, and Neovim +- **Portable** -- Distributed as a single binary for easy installation +- **Fast** -- Optimized to process millions of items instantly +- **Versatile** -- Fully customizable through an event-action binding mechanism +- **All-inclusive** -- Comes with integrations for Bash, Zsh, Fish, Vim, and Neovim Table of Contents ----------------- @@ -440,7 +440,7 @@ or `py`. The user interface of fzf is fully customizable with a large number of configuration options. For a quick setup, you can start with one of the style -presets — `default`, `full`, or `minimal` — using the `--style` option. +presets -- `default`, `full`, or `minimal` -- using the `--style` option. ```sh fzf --style full \ diff --git a/src/algo/SIMD.md b/src/algo/SIMD.md index 0cffe612..330fc865 100644 --- a/src/algo/SIMD.md +++ b/src/algo/SIMD.md @@ -2,10 +2,10 @@ ## What these functions do -`indexByteTwo(s []byte, b1, b2 byte) int` — returns the index of the +`indexByteTwo(s []byte, b1, b2 byte) int` -- returns the index of the **first** occurrence of `b1` or `b2` in `s`, or `-1`. -`lastIndexByteTwo(s []byte, b1, b2 byte) int` — returns the index of the +`lastIndexByteTwo(s []byte, b1, b2 byte) int` -- returns the index of the **last** occurrence of `b1` or `b2` in `s`, or `-1`. They are used by the fuzzy matching algorithm (`algo.go`) to skip ahead @@ -91,9 +91,9 @@ implementations (`2xIndexByte` using `bytes.IndexByte`, and a simple `loop`). The assembly is verified by three layers of testing: -1. **Table-driven tests** — known inputs with expected outputs. -2. **Exhaustive tests** — all lengths 0–256, every match position, no-match +1. **Table-driven tests** -- known inputs with expected outputs. +2. **Exhaustive tests** -- all lengths 0–256, every match position, no-match cases, and both-bytes-present cases, compared against a simple loop reference. -3. **Fuzz tests** — randomized inputs via `testing.F`, compared against the +3. **Fuzz tests** -- randomized inputs via `testing.F`, compared against the same loop reference. diff --git a/src/algo/indexbyte2_arm64.s b/src/algo/indexbyte2_arm64.s index 38da3617..aa3b7340 100644 --- a/src/algo/indexbyte2_arm64.s +++ b/src/algo/indexbyte2_arm64.s @@ -78,7 +78,7 @@ loop: CBZ R6, loop end: - // Found something or out of data — build full syndrome + // Found something or out of data, build full syndrome VAND V5.B16, V3.B16, V3.B16 VAND V5.B16, V4.B16, V4.B16 VADDP V4.B16, V3.B16, V6.B16 diff --git a/src/ansi.go b/src/ansi.go index eb51eb61..34d23128 100644 --- a/src/ansi.go +++ b/src/ansi.go @@ -484,7 +484,7 @@ func interpretCode(ansiCode string, prevState *ansiState) ansiState { state.attr = state.attr | tui.Italic case 4: if sep == ':' { - // SGR 4:N — underline style sub-parameter + // SGR 4:N - underline style sub-parameter var subNum int subNum, _, ansiCode = parseAnsiCode(ansiCode) state.attr = state.attr &^ tui.UnderlineStyleMask diff --git a/src/terminal_test.go b/src/terminal_test.go index cf121537..b26ad52a 100644 --- a/src/terminal_test.go +++ b/src/terminal_test.go @@ -721,7 +721,7 @@ func TestWordWrapAnsiLine(t *testing.T) { t.Errorf("ANSI: %q", result) } - // Long word (no space) — no break, let character wrapping handle it + // Long word (no space) - no break, let character wrapping handle it result = term.wordWrapAnsiLine("abcdefghij", 5, 2) if len(result) != 1 || result[0] != "abcdefghij" { t.Errorf("Long word: %q", result) @@ -749,7 +749,7 @@ func TestWordWrapAnsiLine(t *testing.T) { // Tab handling: tab expands to tabstop-aligned width term.tabstop = 8 - // "\thi there" — tab at column 0 expands to 8, total "hi" starts at 8 + // "\thi there" - tab at column 0 expands to 8, total "hi" starts at 8 // maxWidth=15: "\thi" = 10 wide, "there" = 5 wide, total 16 > 15, wrap at space result = term.wordWrapAnsiLine("\thi there", 15, 2) if len(result) != 2 || result[0] != "\thi" || result[1] != "there" { diff --git a/src/tui/tui_test.go b/src/tui/tui_test.go index 1d40e10d..eea2327e 100644 --- a/src/tui/tui_test.go +++ b/src/tui/tui_test.go @@ -9,7 +9,7 @@ func TestWrapLine(t *testing.T) { t.Errorf("Basic wrap: %v", lines) } - // Exact fit — no wrapping needed + // Exact fit - no wrapping needed lines = WrapLine("hello", 0, 5, 8, 2) if len(lines) != 1 || lines[0].Text != "hello" || lines[0].DisplayWidth != 5 { t.Errorf("Exact fit: %v", lines) diff --git a/test/test_core.rb b/test/test_core.rb index a174ab40..965aa6dc 100644 --- a/test/test_core.rb +++ b/test/test_core.rb @@ -1672,7 +1672,7 @@ class TestCore < TestInteractive end tmux.send_keys :BSpace, :BSpace, :BSpace - # Reload with shuffled order — cursor should track "555" + # Reload with shuffled order - cursor should track "555" tmux.send_keys 'C-r' tmux.until do |lines| assert_equal 1000, lines.match_count @@ -1694,7 +1694,7 @@ class TestCore < TestInteractive tmux.send_keys :Up tmux.until { |lines| assert_includes lines, '> 2 banana' } - # Reload — the second field changes, but first field "2" stays + # Reload - the second field changes, but first field "2" stays tmux.send_keys 'C-r' tmux.until do |lines| assert_equal 3, lines.match_count @@ -1709,7 +1709,7 @@ class TestCore < TestInteractive tmux.send_keys :Up tmux.until { |lines| assert_includes lines, '> beta' } - # Reload with completely different items — no match for "beta" + # Reload with completely different items - no match for "beta" # Cursor stays at the same position (second item) tmux.send_keys 'C-r' tmux.until do |lines| @@ -1727,7 +1727,7 @@ class TestCore < TestInteractive assert_includes lines[-2], '+T' end - # Trigger slow reload — should show +T* while blocked + # Trigger slow reload - should show +T* while blocked tmux.send_keys 'C-r' tmux.until { |lines| assert_includes lines[-2], '+T*' } @@ -1769,7 +1769,7 @@ class TestCore < TestInteractive assert_includes lines, '> 1' end - # Trigger reload — blocked during initial sleep + # Trigger reload - blocked during initial sleep tmux.send_keys 'C-r' tmux.until { |lines| assert_includes lines[-2], '+T*' } # Match "1" arrives, unblocks before the remaining items load @@ -1790,7 +1790,7 @@ class TestCore < TestInteractive assert_includes lines, '> 1' end - # Trigger reload-sync — every observable state must be either: + # Trigger reload-sync - every observable state must be either: # 1. +T* (still blocked), or # 2. final state (count=10, +T without *) # Any other combination (e.g. unblocked while count < 10) is a bug. @@ -1835,7 +1835,7 @@ class TestCore < TestInteractive tmux.send_keys :Up tmux.until { |lines| assert_includes lines, '> beta' } - # Reload with completely different items — no match for "beta" + # Reload with completely different items - no match for "beta" tmux.send_keys 'C-r' tmux.until { |lines| assert_includes lines[-2], '+T*' } # After stream completes, unblocks with cursor at same position (second item) @@ -1857,7 +1857,7 @@ class TestCore < TestInteractive tmux.send_keys 'C-t' tmux.until { |lines| assert_includes lines[-2], '+t' } - # Reload — should track by field "2" + # Reload - should track by field "2" tmux.send_keys 'C-r' tmux.until do |lines| assert_equal 3, lines.match_count @@ -1876,7 +1876,7 @@ class TestCore < TestInteractive tmux.send_keys :Up, :Up, :Tab tmux.until { |lines| assert_includes lines[-2], '(2)' } - # Reload — selections should be preserved by id-nth key + # Reload - selections should be preserved by id-nth key tmux.send_keys 'C-r' tmux.until do |lines| assert_equal 3, lines.match_count diff --git a/test/test_server.rb b/test/test_server.rb index 2b2346ec..cbfbab04 100644 --- a/test/test_server.rb +++ b/test/test_server.rb @@ -40,7 +40,7 @@ class TestServer < TestInteractive assert_equal [0, 1], state[:current][:positions] assert_equal state[:current][:positions], state[:current][:positions].sort - # No match — no current item + # No match - no current item Net::HTTP.post(fn.call, 'change-query(yo)+reload(seq 100)+change-prompt:hundred> ') tmux.until { |lines| assert_equal 100, lines.item_count } tmux.until { |lines| assert_equal 'hundred> yo', lines[-1] }