Projects STRLCPY fzf Commits 4bef330c
🤬
  • ■ ■ ■ ■ ■
    CHANGELOG.md
    skipped 9 lines
    10 10   ```
    11 11  - Support `border-{up,down}` as the synonyms for `border-{top,bottom}` in
    12 12   `--preview-window`
     13 +- Added support for ANSI `strikethrough`
     14 + ```sh
     15 + printf "\e[9mdeleted" | fzf --ansi
     16 + fzf --color fg+:strikethrough
     17 + ```
    13 18   
    14 19  0.32.1
    15 20  ------
    skipped 1285 lines
  • ■ ■ ■ ■
    go.mod
    1 1  module github.com/junegunn/fzf
    2 2   
    3 3  require (
    4  - github.com/gdamore/tcell v1.4.0
     4 + github.com/gdamore/tcell/v2 v2.5.3
    5 5   github.com/mattn/go-isatty v0.0.14
    6 6   github.com/mattn/go-runewidth v0.0.13
    7 7   github.com/mattn/go-shellwords v1.0.12
    skipped 15 lines
  • ■ ■ ■ ■ ■ ■
    go.sum
    1 1  github.com/gdamore/encoding v1.0.0 h1:+7OoQ1Bc6eTm5niUzBa0Ctsh6JbMW6Ra+YNuAtDBdko=
    2 2  github.com/gdamore/encoding v1.0.0/go.mod h1:alR0ol34c49FCSBLjhosxzcPHQbf2trDkoo5dl+VrEg=
    3  -github.com/gdamore/tcell v1.4.0 h1:vUnHwJRvcPQa3tzi+0QI4U9JINXYJlOz9yiaiPQ2wMU=
    4  -github.com/gdamore/tcell v1.4.0/go.mod h1:vxEiSDZdW3L+Uhjii9c3375IlDmR05bzxY404ZVSMo0=
    5  -github.com/lucasb-eyer/go-colorful v1.0.3/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
     3 +github.com/gdamore/tcell/v2 v2.5.3 h1:b9XQrT6QGbgI7JvZOJXFNczOQeIYbo8BfeSMzt2sAV0=
     4 +github.com/gdamore/tcell/v2 v2.5.3/go.mod h1:wSkrPaXoiIWZqW/g7Px4xc79di6FTcpB8tvaKJ6uGBo=
    6 5  github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=
    7 6  github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
    8 7  github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
    9 8  github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
    10  -github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
    11 9  github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU=
    12 10  github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
    13 11  github.com/mattn/go-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebGE2xrk=
    skipped 5 lines
    19 17  golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
    20 18  golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
    21 19  golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
    22  -golang.org/x/sys v0.0.0-20190626150813-e07cf5db2756/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
     20 +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
    23 21  golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
    24 22  golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
     23 +golang.org/x/sys v0.0.0-20220318055525-2edf467146b5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
    25 24  golang.org/x/sys v0.0.0-20220406163625-3f8b81556e12 h1:QyVthZKMsyaQwBTJE04jdNN0Pp5Fn9Qga0mrgxyERQM=
    26 25  golang.org/x/sys v0.0.0-20220406163625-3f8b81556e12/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
     26 +golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
    27 27  golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
    28 28  golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
    29 29  golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
    skipped 4 lines
  • ■ ■ ■ ■ ■
    man/man1/fzf.1
    skipped 20 lines
    21 21  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    22 22  THE SOFTWARE.
    23 23  ..
    24  -.TH fzf 1 "Aug 2022" "fzf 0.32.1" "fzf - a command-line fuzzy finder"
     24 +.TH fzf 1 "Aug 2022" "fzf 0.32.2" "fzf - a command-line fuzzy finder"
    25 25   
    26 26  .SH NAME
    27 27  fzf - a command-line fuzzy finder
    skipped 350 lines
    378 378   \fBreverse\fR
    379 379   \fBdim\fR
    380 380   \fBitalic\fR
     381 + \fBstrikethrough\fR
    381 382   
    382 383  .B EXAMPLES:
    383 384   
    skipped 651 lines
  • ■ ■ ■ ■ ■
    src/ansi.go
    skipped 54 lines
    55 55   if s.attr&tui.Reverse > 0 {
    56 56   ret += "7;"
    57 57   }
     58 + if s.attr&tui.StrikeThrough > 0 {
     59 + ret += "9;"
     60 + }
    58 61   ret += toAnsiString(s.fg, 30) + toAnsiString(s.bg, 40)
    59 62   
    60 63   return "\x1b[" + strings.TrimSuffix(ret, ";") + "m"
    skipped 315 lines
    376 379   state.attr = state.attr | tui.Blink
    377 380   case 7:
    378 381   state.attr = state.attr | tui.Reverse
     382 + case 9:
     383 + state.attr = state.attr | tui.StrikeThrough
    379 384   case 23: // tput rmso
    380 385   state.attr = state.attr &^ tui.Italic
    381 386   case 24: // tput rmul
    skipped 48 lines
  • ■ ■ ■ ■ ■ ■
    src/options.go
    skipped 699 lines
    700 700   cattr.Attr |= tui.Blink
    701 701   case "reverse":
    702 702   cattr.Attr |= tui.Reverse
     703 + case "strikethrough":
     704 + cattr.Attr |= tui.StrikeThrough
    703 705   case "black":
    704 706   cattr.Color = tui.Color(0)
    705 707   case "red":
    skipped 1081 lines
  • ■ ■ ■ ■ ■ ■
    src/tui/dummy.go
    skipped 13 lines
    14 14   
    15 15  const (
    16 16   AttrUndefined = Attr(0)
    17  - AttrRegular = Attr(1 << 7)
    18  - AttrClear = Attr(1 << 8)
     17 + AttrRegular = Attr(1 << 8)
     18 + AttrClear = Attr(1 << 9)
    19 19   
    20  - Bold = Attr(1)
    21  - Dim = Attr(1 << 1)
    22  - Italic = Attr(1 << 2)
    23  - Underline = Attr(1 << 3)
    24  - Blink = Attr(1 << 4)
    25  - Blink2 = Attr(1 << 5)
    26  - Reverse = Attr(1 << 6)
     20 + Bold = Attr(1)
     21 + Dim = Attr(1 << 1)
     22 + Italic = Attr(1 << 2)
     23 + Underline = Attr(1 << 3)
     24 + Blink = Attr(1 << 4)
     25 + Blink2 = Attr(1 << 5)
     26 + Reverse = Attr(1 << 6)
     27 + StrikeThrough = Attr(1 << 7)
    27 28  )
    28 29   
    29 30  func (r *FullscreenRenderer) Init() {}
    skipped 16 lines
  • ■ ■ ■ ■ ■ ■
    src/tui/light.go
    skipped 855 lines
    856 856   if (attr & Reverse) > 0 {
    857 857   codes = append(codes, "7")
    858 858   }
     859 + if (attr & StrikeThrough) > 0 {
     860 + codes = append(codes, "9")
     861 + }
    859 862   return codes
    860 863  }
    861 864   
    skipped 156 lines
  • ■ ■ ■ ■ ■ ■
    src/tui/tcell.go
    skipped 7 lines
    8 8   
    9 9   "runtime"
    10 10   
    11  - "github.com/gdamore/tcell"
    12  - "github.com/gdamore/tcell/encoding"
     11 + "github.com/gdamore/tcell/v2"
     12 + "github.com/gdamore/tcell/v2/encoding"
    13 13   
    14 14   "github.com/mattn/go-runewidth"
    15 15   "github.com/rivo/uniseg"
    skipped 3 lines
    19 19   return true
    20 20  }
    21 21   
     22 +func asTcellColor(color Color) tcell.Color {
     23 + value := uint64(tcell.ColorValid) + uint64(color)
     24 + if color.is24() {
     25 + value = value | uint64(tcell.ColorIsRGB)
     26 + }
     27 + return tcell.Color(value)
     28 +}
     29 + 
    22 30  func (p ColorPair) style() tcell.Style {
    23 31   style := tcell.StyleDefault
    24  - return style.Foreground(tcell.Color(p.Fg())).Background(tcell.Color(p.Bg()))
     32 + return style.Foreground(asTcellColor(p.Fg())).Background(asTcellColor(p.Bg()))
    25 33  }
    26 34   
    27  -type Attr tcell.Style
     35 +type Attr int32
    28 36   
    29 37  type TcellWindow struct {
    30 38   color bool
    skipped 41 lines
    72 80  }
    73 81   
    74 82  const (
    75  - Bold Attr = Attr(tcell.AttrBold)
    76  - Dim = Attr(tcell.AttrDim)
    77  - Blink = Attr(tcell.AttrBlink)
    78  - Reverse = Attr(tcell.AttrReverse)
    79  - Underline = Attr(tcell.AttrUnderline)
    80  - Italic = Attr(tcell.AttrItalic)
     83 + Bold Attr = Attr(tcell.AttrBold)
     84 + Dim = Attr(tcell.AttrDim)
     85 + Blink = Attr(tcell.AttrBlink)
     86 + Reverse = Attr(tcell.AttrReverse)
     87 + Underline = Attr(tcell.AttrUnderline)
     88 + StrikeThrough = Attr(tcell.AttrStrikeThrough)
     89 + Italic = Attr(tcell.AttrItalic)
    81 90  )
    82 91   
    83 92  const (
    skipped 477 lines
    561 570   style = style.
    562 571   Reverse(a&Attr(tcell.AttrReverse) != 0).
    563 572   Underline(a&Attr(tcell.AttrUnderline) != 0).
     573 + StrikeThrough(a&Attr(tcell.AttrStrikeThrough) != 0).
    564 574   Italic(a&Attr(tcell.AttrItalic) != 0).
    565 575   Blink(a&Attr(tcell.AttrBlink) != 0).
    566 576   Dim(a&Attr(tcell.AttrDim) != 0)
    skipped 45 lines
    612 622   Dim(a&Attr(tcell.AttrDim) != 0).
    613 623   Reverse(a&Attr(tcell.AttrReverse) != 0).
    614 624   Underline(a&Attr(tcell.AttrUnderline) != 0).
     625 + StrikeThrough(a&Attr(tcell.AttrStrikeThrough) != 0).
    615 626   Italic(a&Attr(tcell.AttrItalic) != 0)
    616 627   
    617 628   gr := uniseg.NewGraphemes(text)
    skipped 105 lines
  • ■ ■ ■ ■
    src/tui/tcell_test.go
    skipped 4 lines
    5 5  import (
    6 6   "testing"
    7 7   
    8  - "github.com/gdamore/tcell"
     8 + "github.com/gdamore/tcell/v2"
    9 9   "github.com/junegunn/fzf/src/util"
    10 10  )
    11 11   
    skipped 382 lines
Please wait...
Page is in error, reload to recover